Set Vary: Accept-Encoding Header (nginx)

This is from the nginx documentation.

gzip_vary
syntax: gzip_vary on|off
default: gzip_vary off
context: http, server, location

Enables response header of "Vary: Accept-Encoding". Note that this
header causes IE 4-6 not to cache the content due to a bug (see 2 ).

There if you just add gzip_vary on; it should do it’s job.

Also make sure you have any one of the directives gzip, gzip_static, or gunzip are active.

Leave a Comment