How to

Best 5 Ways to Remove Query Strings from Static resources

Pinterest LinkedIn Tumblr

Want to boost the performance of your website? Then you have definitely got to learn about the best ways to remove query strings from static resources!

Whenever you check your website’s performance on GTmetrix, “Remove Query Strings from Static Resources” is the most common statement that you see. As we all know that Google has started ranking the websites that have the lowest load time.

remove query strings static resources

There are many tools like Pingdom, Google Page Speed, GTmetrix etc are available today. These tools can easily let you know what element of your website is hampering the speed and what all modifications you will have to make in order to get good page speed score.

As you all know, that most of the people aren’t that good with coding and thus the statement “Remove Query Strings from Static Resources” is like a rocket science for them. But, to be true it’s not at all a rocket science.

Here in this post, I am sharing the guide that will help you out.

Remove Query Strings from Static Resources

So, the question arises here is, how one can Remove Query Strings from Static Resources to get the best loading speed possible.

Coding and all come under development and thus for each problem there are many solutions. Here I am discussing the easiest ways to resolve the problem of Removing Query Strings from Static Resources.

#1. Making changes to code

The first solution is to add the given below code to the functions.php file of your theme, then save it, clear cache and try if it works.

[php]

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

[/php]

#2. Using W3 Total Cache

The second way is by using W3 Total Cache. This is the best plugin to remove query strings from static resources. You just have to go to the option “Browser Cache Settings” and remove the check mark from “Prevent caching of objects after settings change” and save it.

With this way, you can easily remove query strings from static resources without digging your hands into coding.

remove query strings static resources

#3. Remove Query Strings from Static Resources

remove-query strings static resources plugin

The third method is by using a dedicated plugin only to remove query strings from static resources. The plugin is really simple and you just have to install and activate it. There is no configuration or setting that you have to make. Plugin is named as “Remove Query Strings from Static Resources”. The plugin is already downloaded more than 25000 times and most of the users have shared five-star rating for this. So I am sure that this would help you a lot.

#4. Query Strings Remover

query string remover

Query Strings Remover is yet another wonderful plugin that removes query strings from static resources like CSS and JavaScript. This plugin is also easy to use and you just have to install and activate it.

#5. Speed Booster Pack

Speed Booster Pack is one of the most useful WordPress plugin that will help you in making a lot of improvement in terms of performance. This plugin will also make your website SEO friendly.

speed-booster-pack

This plugin can perform the following actions

  • Remove external rendering Java scripts and CSS from above the fold
  • Migrate scripts to footers from header
  • Can load CSS asynchronously so that the pages are rendered quickly
  • Inline and Minify CSS
  • Lazy Load Images
  • Change the level of images compression.

Conclusion:- loading speed of website is one of the most important thing from both search engine and user experience point of view. Everyone ignores the website that takes a hell lot of time in loading. So in order to get the best, you must make sure that your website loads instantly.

While optimizing, don’t forget to Remove query strings from static resources because it’s the most critical factor.

Last Updated on

I am webmaster and developer of this website, This site is made with only one aim to provide genuine tech news, tutorials and tips and tricks to help others. I am currently doing my post graduation from NIT JAMSHEDPUR, Connect with me on my social media channels or drop a mail :)

1 Comment

Write A Comment