Welcome! Log In Create A New Profile

Advanced

Re: Accept-Encoding: gzip and the Vary header

Xavier Noria
June 04, 2015 03:38PM
Ahhh, I see.

We've seen that if you want cache + compression, then you need Vary. So
by counter-reciprocal the trade-off of gzip_vary off is that the response
can't be cached at all in the sense that you're not sending the proper
headers. *No matter if the cache is private or shared*. At least in theory.

If you turn gzip_vary on to get some caching, but keep gzip_proxied off,
and Cache-Control is "public", then I guess clients behind those shared
caches would get uncompressed content unless the shared caches themselves
compress on the fly (does that happen?)

In the typical use case of a CSS file with a fingerprint in its filename
for aggressive caching I guess you actually need to go with (off the top of
my head):

gzip_vary on;
gzip_proxied on;

expires max;
add_header Cache-Control "public";
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Accept-Encoding: gzip and the Vary header

Xavier Noria June 04, 2015 03:18AM

Re: Accept-Encoding: gzip and the Vary header

Jason Woods June 04, 2015 04:58AM

Re: Accept-Encoding: gzip and the Vary header

Xavier Noria June 04, 2015 05:52AM

Re: Accept-Encoding: gzip and the Vary header

Maxim Dounin June 04, 2015 09:12AM

Re: Accept-Encoding: gzip and the Vary header

Xavier Noria June 04, 2015 09:44AM

Re: Accept-Encoding: gzip and the Vary header

Maxim Dounin June 04, 2015 10:26AM

Re: Accept-Encoding: gzip and the Vary header

Xavier Noria June 04, 2015 03:38PM

Re: Accept-Encoding: gzip and the Vary header

Xavier Noria June 04, 2015 03:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 314
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready