contact at jpluscplusm
Apr 3, 2012, 10:39 AM
Post #3 of 3
On 3 April 2012 15:25, Kurt Kraut <listas [at] kurtkraut> wrote:
Re: How to ignore chars after question mark in URL?
[In reply to]
> I need to cache URLs of the same file but the front-end developer generates
> a random string, e.g.:
> How can I get a HIT for www.kurtkraut.net/index.css not matter the presence
> or not of the question mark and the random string after the question mark?
> Is it possible to ignore the presence of the question mark and the rest of
> the URL?
In my experience, developers often do this deliberately as a method of
versioning their CSS and JS. They'll append a "random" string (often a
unix timestamp) at deployment time, rendering that particular version
of the resource cachable until the next deployment.
Are you absolutely sure that this isn't what your devs are doing?
Because if they are, you'd be doing *exactly* the wrong thing by
explicitly ignoring the query-string, and may well break the
application during a random deploy, sometime in the future. But
possibly not during *each* deployment, leading to nicely intermittent
bug reports depending on the amount each CSS/JS has changed, and the
state of the user's browser cache :-)
London, Oxford, UK
varnish-misc mailing list
varnish-misc [at] varnish-cache