Ways to control the gzip_vary directive from nginx 0.6.34 and above?
zblut at cerego.co.jp
Tue Sep 15 09:38:48 MSD 2009
On 09/15/2009 01:47 PM, Jeff Waugh wrote:
> <quote who="Zev Blut">
>> Nginx 0.6.34 and above have changed the gzip_vary directive to add the
>> "Vary: Accept-Encoding" header to uncompressed responses as well as
>> compressed responses.
> This should only be the case for the matched gzip_types, though not *all*
> uncompressed responses. Have you included (inappropriate for compression)
> image and audio types in gzip_types? If so, remove them, and you should be
> done (unless there is a bug in nginx -> but I haven't seen a similar thing
> happen on my servers).
I don't think I have, but just in case here is a copy of my gzip commands:
# Serve up static compressed items
gzip_buffers 16 8k;
# Some version of IE 6 don't handle compression well on some mime-types,
so just disable for them
gzip_disable "MSIE [1-6].(?!.*SV1)";
# Set a vary header so downstream proxies don't send cached gzipped
content to IE6
But with these commands things like jpgs and mp3s are still getting the
Vary: Accept-Encoding header, even though they are not compressed.
Is there something I am missing?
More information about the nginx