How to remove Query String “?” (question mark) from URL (Using WordPress)

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 …

Read More

http://gizmocube.com/images/logo.png?9d7bd4

how do i get rid of this question mark…. any .htacess stuff… any help would be appreciated….

Related posts

Leave a Reply

4 comments

  1. 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 )

  2. 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 );