Remove query strings from static resources to improve page speed

Write for Us: Familiar with Smart Home Automation, Media Streaming, HTPC, and Home Server topics? Write for us and get paid. Writing experience not required. APPLY HERE.

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!

Did this post help you?
SmartHomeBeginner brings in-depth tutorials easy enough to understand even for beginners. This takes a considerable amount of work. If this post helps you, please consider supporting us as a token of appreciation:
  • Feeling generous? Become a Sponsor (discounted options) or a Patron. You will receive privileges on our Discord Server.
  • Just want to thank us? Buy us a Coffee or a Ko-Fi.
  • May be another day? Shop on Amazon using our links. Your prices won't change but we get a small commission.
  • Don't feel like spending? You can still show your support by sharing this post, linking to it in forums, or even commenting below.

Anand

Anand is a self-learned computer enthusiast, hopeless tinkerer (if it ain't broke, fix it), a part-time blogger, and a Scientist during the day. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, Smart Home Automation, and related HOW-TOs.