WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] Remove query strings from static resources (4 posts)

  1. Erik Balster
    Member
    Posted 9 months ago #

    Hello,

    i installed this plugin yesterday. I also use maxcdn and my website is way faster then before.

    The only problem is that after i installed the plugin pingdom says that i have to remove query strings from static resources.

    I searched for it on the internet and i saw that i have to uncheck the box : Prevent caching of objects after settings change.

    The problem is that i unchecked this box but i dont't see any results. Pingdom still gives the same grade.

    Have can i fix this?

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

  2. longnha
    Member
    Posted 8 months ago #

    I had the same problem before, after searching on Google I found the solution, add the code inside the PHP tage of your functions.php file.

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

    It work for more at least, hope it do for you.

    Source here: http://diywpblog.com/wordpress-optimization-remove-query-strings-from-static-resources/

  3. Erik Balster
    Member
    Posted 8 months ago #

    hello longnha,

    i allready tried this but first it didn't work. After purge the CDN completly and empty the cache in Minify is worked.

    Thanks for helping me.

  4. nevin.folino88
    Member
    Posted 4 months ago #

    Is there anyway I could see a screen shot of exactly where that code gets copied into?

    I'm not a coder and don't really know what I'm doing.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.