About Varnish cache delivery

Jonathan Leibiusky ionathan at gmail.com
Sat Dec 4 17:51:23 CET 2010


If you have a Vary header like this (or something like this):
Vary: Accept-Encoding

And your request has a header like this:
Accept-Encoding: gzip

What will happen is that varnish won't find in the cache the resource you
are looking for with this encoding, so it will go to the backend and ask for
it.

I believe you can play with vcl and change this behavior. Although you
should be careful.

Jonathan

On Sat, Dec 4, 2010 at 12:44 PM, FabD [ML] <flylm.ml at gmail.com> wrote:

> Hi,
>
> I've a question about a case :
>
> 1) Imagine Varnish have a page in cache, but a page that is not compressed.
> 2) If I call this page with a client that supports gzip encoding,
> varnish ask backend for a gzip encoded page or send the non-encoded
> page from cache ?
>
> Actually, i notice sometime I receive some "non-encoded" page, I would
> like to understant why.
>
> ps : Accept-encoding header is normalized.
>
> Thanks,
> Fabien
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20101204/04585216/attachment-0003.html>


More information about the varnish-misc mailing list