disable gzip based on user-agent

Eden Li eden at mojiti.com
Thu Oct 18 09:08:46 MSD 2007

Hi all,

Is it possible to turn off gzip compression based on $http_user_agent?  I tried:

  if ($http_user_agent ~* msie\s+6\.0) { gzip off; }

Except nginx says that I can't put gzip there.  Is there another way?

Background for those interested: Flash in IE6 can't handle gzipped
content even though it advertises that it can.


More information about the nginx mailing list