caching of request with cookies
harm.verhagen at gmail.com
Thu Sep 23 10:59:40 CEST 2010
I noticed that varnish out of the box doesn't cache requests that carry a
This seems a bit too conservative to me.
According to the http specs the mere existence of a cookie should not
influence cachebility. In the content of the response depends on the
cookie, the server should tell in the response that the contents are not
The Vary: Cookie header exists for that reason, no ?
In the current default configuration if you put varnish in front of a
'well-behaving' (as in "adding all the required caching related http
headers") website. Most cacheble content does _not_ get cached. Unless you
do some non obvious (to me :) ) configuration of varnish.
What are the thoughts on this list about moving the default varnish
configuration closer to the http specification, regarding caching of request
where the client sends a cookie (and probably leading to problems on
websites that do _not_ use http headers correctly)
Does anyone has a pointer to a varnish configuration that does the thing I
described above. I don't mean an example where vanish just strips off
cookies of images/js/css files request. (I found plenty examples of that
scenario) But leaving cookies as is, but just look at the responses to
decide if the content should be cached or not. So that varnish can
selectively cache html pages based on their response, where all requests
potentially have cookies).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the varnish-dev