DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

John has posted 18 posts at DZone. View Full User Profile

Nginx Gzip Config

  • submit to reddit
  # output compression saves bandwidth 
  gzip              on;
  gzip_proxied      any;
  gzip_http_version 1.1;
  #gzip_min_length   1100;
  gzip_comp_level   5;
  #gzip_buffers      4 8k;
  gzip_types        text/plain text/html text/xml text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/atom+xml;
  #gzip_vary        on;
  #gzip_disable     "MSIE [1-6]\.";


Justu Stan replied on Fri, 2014/03/14 - 6:24am

I was happy that you have shared here the code of the Ngnix Gzip config. It would have been so nice if you had given a brief note on the code that you have shared here like how it is working and method for implementing the code.
learn more 

John Griffiths replied on Mon, 2007/07/23 - 6:25am

but then in todays world of super-fast processors and heavy-duty webapps you can probably get away with 5.

John Griffiths replied on Mon, 2007/07/23 - 6:25am

to be honest, a setting of 2 for comp_level would be fine, 5 loses an extra 3-4k, over 3 but not enough to be healthy.