0

I am using GTMetrix to test the speed of one of my sites. The report says that I should 'Remove query strings from static resources'

Resources with a "?" in the URL are not cached by some proxy caching servers. Remove the query string and encode the parameters into the URL for the following resources...

How can I do that and is it recommended?

1

1 Answer 1

1

IMO it is recommended to ignore 50% of the google speedtest recommendations, this is one of them

Resources with a "?" in the URL are not cached by some proxy caching servers. Remove the query string and encode the parameters into the URL for the following resources...

Maybe it was true in 2005 but now I wish google would have specified exactly which are they. In any case the chances of any page of any small or medium site to be cached and reused from the cache is minimal. The effort you might need to put in rearranging the urls of your static resources is not worth the zero speed improvement your site will gain.

6
  • I would advise against blanket statement in regards to performance. Web is not identical for everyone - someone is behind corporate proxy, someone is on mobile behind traffic optimizer, etc. Bash google's recommendation when you have proof they are harmful. :)
    – Rarst
    Jan 1, 2014 at 20:48
  • I qualified it to "small and medium sites", how many people in your organization read my (currently broken) blog? ;) Jan 1, 2014 at 20:51
  • @rarst, this is not a duplicate as this is a more general question. you can't remove ? from static resources which weren't enqueued Jan 1, 2014 at 21:09
  • Which is explicitly mentioned in that thread. :)
    – Rarst
    Jan 1, 2014 at 21:16
  • 1
    As @Rarst say you might be in a unique position in which it will make a difference but I believe the chances for that if you are not working on a big portal is very slim. Not being able to actually test the results of such recommendation is part of why I don't like it. Jan 3, 2014 at 4:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.