WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Use a Content Delivery Network (CDN) (15 posts)

  1. kmcminn
    Member
    Posted 6 months ago #

    I've had W3 Total Cache installed and configured correctly for months now. I watched a lot of different video tutorials on how to set up the CDN portion and have also had that configured for quite some time.

    What's interesting is if I run a test at http://gtmetrix.com, I still receive a score of F (0) for "Use a Content Delivery Network (CDN)" under the YSlow tab.

    In all the video tutorials I watched, that score changed immediately upon configuring the CDN. Was there something I missed along the way?

    Thanks for all of your hard work and efforts with this plugin.

    http://wordpress.org/plugins/w3-total-cache/

  2. Angelica Costa
    Member
    Posted 6 months ago #

    What cdn are you using?

  3. kmcminn
    Member
    Posted 6 months ago #

    Hello, Angelica. I am using MaxCDN.

  4. Angelica Costa
    Member
    Posted 6 months ago #

    Check the source code to see if the images/css/js are indeed coming from the cdn.
    Can you provide a link to your site?

  5. kmcminn
    Member
    Posted 6 months ago #

    Everything "appears" to be OK and properly setup with my CDN. Maybe your eyes are better than mine though. Here's my site: http://goo.gl/lHw8vO

  6. Angelica Costa
    Member
    Posted 6 months ago #

  7. kmcminn
    Member
    Posted 6 months ago #

    Thanks for the response. I do understand that 3rd party scripts and images cannot be directly loaded from a self-hosted server or CDN.

    The problem is that it's simply not detecting that I am using a CDN when I run a test at http://gtmetrix.com. But it most definitely should be.

  8. Angelica Costa
    Member
    Posted 6 months ago #

    Nope, as you cannot host these files or send it to a cdn because they are generated dynamically, Yslow "thinks" you just don't want to do it.

    It is says you are loading cdn for everything else BUT those files.
    http://awesomescreenshot.com/08a1uwebf9

    To score better you could remove adsense and disable the jetpack statistics.

    Btw, you score better without the www. Go figure. You should try a redirect.

  9. kmcminn
    Member
    Posted 6 months ago #

    I see. That makes sense now. After watching all the videos on how to set this up, I don't recall the users ever having any special plugins or 3rd party extensions enabled. I'm fine with this then.

    Thanks kindly for all of your help, Angelica.

    One last question...

    Should there be version numbers at the end of these files? It seems to me that it would pose an insecurity. And no other sites I look at have them at the end of the files.

    /wp-includes/css/admin-bar.min.css?ver=3.6.1'
    /wp-content/plugins/jetpack/modules/widgets/widget-grid-and-list.css?ver=3.6.1'
    /wp-includes/js/admin-bar.min.js?ver=3.6.1'

  10. Angelica Costa
    Member
    Posted 6 months ago #

    This will take care of it:

    function remove_query_string( $src ){
         $parts = explode( '?ver', $src );
              return $parts[0];
    }
    add_filter( 'script_loader_src', 'remove_query_string', 15, 1 );
    add_filter( 'style_loader_src', 'remove_query_string', 15, 1 );

    Paste it on functions.php

  11. kmcminn
    Member
    Posted 6 months ago #

    Thanks, Angelica. Not doubting you by any means, but I doubt all the site owners that don't have the version numbers displayed, haven't manually added that to the core file. Where did you find that info? Does it boil down to a theme issue?

  12. Angelica Costa
    Member
    Posted 6 months ago #

    If you use w3 total cache, there is an option for that.

    http://wordpress.org/support/topic/plugin-w3-total-cache-remove-query-string-from-static-content?replies=5#post-2636869

    Check Fred's answer.

    I supposed some plugins do that, as well as cloudflare.

  13. kmcminn
    Member
    Posted 6 months ago #

    Thanks, Angelica.

    Fred's response in that topic is "Uncheck the "Prevent caching of objects after settings change" option on the browser cache settings tab."

    ...which would mean to enable it. It's currently already enabled in my settings.

  14. Angelica Costa
    Member
    Posted 6 months ago #

    Yeah, I know, that's why I use the code above.

  15. kmcminn
    Member
    Posted 6 months ago #

    Thank you once again for your wisdom, Angelica. Question...would I have to implement that manual file edit every time I upgrade WordPress? Better yet, should I consult with the author of W3 Total Cache about the issue?

Reply

You must log in to post.

About this Plugin

About this Topic