Quantcast
Channel: WordPress.org Forums » [W3 Total Cache] Support
Viewing all articles
Browse latest Browse all 19291

longnha on "[Plugin: W3 Total Cache] Remove query strings from static resources"

$
0
0

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/


Viewing all articles
Browse latest Browse all 19291

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>