guy mograbi
guy mograbi

Reputation: 28668

Is "Revving filenames - don't use querystring" still relevant?

I know that about 10 years ago it was wrong to use querystrings for cache busting.

This post is often referenced: http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/

Is this still relevant? Should I still prefer filename change over querystring?

Upvotes: 1

Views: 604

Answers (1)

Lionia Vasilev
Lionia Vasilev

Reputation: 12747

Starting from releases 2.7 and 3.1 Squid supports responses to requests with query by default. However, I don't see any advantages of query over path. And since there may be someone who uses old version of Squid or some other proxy that doesn't support this, I probably would use path to specify resource version.

Relevant quote from squid-cache wiki:

The obsolete default configuration of squid prevents the caching of dynamic content (pages with ? in the URI) ....

NOTE: That policy setting was created at a time when dynamic pages rarely contained proper Cache-Controls, that has now changed. From the release of Squid 2.7 and 3.1 the squid developers are advocating a change to this caching policy. These changes will also work in 3.0 and 2.6 releases despite not being officially changed for their squid.conf.default.

Relevant comment to article you linked by Leif Hedstrom:

.... there might be intermediaries between the UA and the origin, which do not allow this. E.g. transparent ISP proxies, corporate firewall proxies, etc. So, the advice is still good, you are better off versioning on the filename.

For more information check:

Upvotes: 2

Related Questions