Reputation: 31
I was using wordpress 3.3 to power my website. I tested it with Page Speed and it gave me error "remove query string from URL).... The query string is a question mark which appears in the start of query paramter of the url.....
http://gizmocube.com/images/logo.png .... is outputted as ...
http://gizmocube.com/images/logo.png?9d7bd4
how do i get rid of this question mark.... any .htacess stuff... any help would be appreciated....
Upvotes: 2
Views: 6095
Reputation: 1
Add this code to your functions.php file, it works for my sites.
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 );
Upvotes: 0
Reputation: 37268
Go to the Browser Cache Tab > untick "Prevent caching of objects after settings change".
This will slove the issue.
Upvotes: 1
Reputation: 31
Do you have W3 Total Cache Installed ? (Wordpress Plugin) , If you do
Go to the Browser Cache Tab
Untick
Prevent caching of objects after settings change
Whenever settings are changed, a new query string will be generated and appended to objects allowing the new policy to be applied.
Clear the Cache then It's gone :) Hope this helps
-- Source Myself (Having the same issue myself )
Upvotes: 3
Reputation: 2498
Change your Permalink settings from the default with question marks to a format you prefer under /wp-admin/options-permalink.php
Upvotes: 0