Hello
I've been testing removing cookies from images/css/js and am a little
unclear on the difference between:
//start ==========
sub vcl_recv {
if (req.url ~ "\.(png|gif|jpg|swf|css|js)$") {
remove req.http.Cookie;
}
//end==========
and...
//start =========
sub vcl_recv {
if (req.url ~ "\.(png|gif|jpg|swf|css|js)$") {
unset req.http.cookie;
}
}
sub vcl_fetch {
if (req.url ~ "\.(png|gif|jpg|swf|css|js)$") {
unset beresp.http.set-cookie;
}
}
//end =========
The first example removes the cookie from
the incoming requests for these files so that these objects are
cacheable.
What I'm a bit unclear on is why the 2nd example uses 'unset' in both
vcl_recv and also when the object has been retrieved from the backend
(vcl_fetch).
I need to be 100% sure that for all image/css objects, there are no
cookies stored anywhere. Is this what the first example does, whereas
the second example 'ignores' the cookie?
Thanks for any help.
Best, David
_______________________________________________
varnish-misc mailing list
[email protected]
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc