Home » Blogging » Remove query strings from static resources to improve page speed
Blogging

Remove query strings from static resources to improve page speed

Recently, I discussed few steps to improve performance and decrease bandwidth. With Google now using page speed to rank pages in their search results it is all the more important to take care of loose ends that adversely affect your search engine optimization. Pingdom and GTMetrix are two tools that you could use to measure your page speeds. They look at various factors that affect page speed and grade your site’s performance in each of the factors. One of the factors that has a high impact is the “Remove query strings from static resources” factor. This can occur if you have W3 Total Cache plugin in your WordPress. In this post, I will show you how to address “Remove query strings from static resources” problem.

Initial Pingdom and GTMetrix Scores

While trying to improve my page speeds, both Pingdom and GTMetrix pointed out that I have to “Remove query strings from static resources“. This factor received low scores as shown in the images below:

remove query strings from static resources
Pingdom Score – Before
GTMetrix Score - Before
GTMetrix Score – Before

Some of the items in the list were within my domain and some of them were from plugins, which I have no control over. I wanted to fix the items that were under my control.

Remove Query Strings from Static Resources

My research shows that a specific “Browser Cache” setting in W3 Total Cache plugin appends query strings to static items. It is the “Prevent caching of objects after settings change”. Uncheck it, save your settings, and deploy the changes. This should now remove the query strings from static resources served from your domain.

Prevent Caching of Objects After Settings Change
Prevent Caching of Objects After Settings Change

Final Pingdom and GTMetrix Scores

After making the above change my Pingdom and GTMetrix scores improved. As shown below, there is still some room for improvement. But this has more to do with the plugins I have installed than the static resources in my domain. So unless I use other plugins or the plugin developers improve the code, it is hard to fix these.

Pingdom Score - After
Pingdom Score – After
GTMetrix Score - After
GTMetrix Score – After

Hope this helps. Go head remove query strings from static resources and speed up your wordpress. If you have other fixes that worked for you please share them with us in the comments section. Enjoy blogging!

About the author

Anand

Anand is a self-learned computer enthusiast, a part-time blogger, and a Food Scientist by career. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, XBMC, and related HOW-TOs (read more).

Archives

Join the other 110,000 followers