Select Page

Nginx Specify a Vary: Accept-Encoding header

Nginx Specify a Vary: Accept-Encoding header

nginx (pronounced “engine-x”) is an open source Web server and a reverse proxy server for HTTP, SMTP, POP3 and IMAP protocols, with a strong focus on high concurrency, performance and low memory usage. It is licensed under a BSD-like license and it runs on Unix, #Linux, BSD variants, Mac OS X, Solaris, AIX and Microsoft Windows [WikiPedia]

Instructs proxy servers to cache two versions of the resource: one compressed, and one uncompressed. This helps avoid issues with public proxies that do not detect the presence of a Content-Encoding header properly.

Configuration files are provided using Gist  https://gist.github.com/1620307 and are CONSTANTLY updated for added security and speed. Gist is a simple way to share snippets and pastes with others. All gists are git repositories, so they are automatically versioned, forkable and usable as a git repository. I recommend you to starred them to stay up to date.

Just Add in /etc/nginx/nginx.conf in the http { … } section the following

 ##  # Gzip Settings  ##  gzip  on;  gzip_http_version 1.1;  gzip_vary on;  gzip_comp_level 6;  gzip_proxied any;  gzip_types text/plain text/html text/css application/json \
            application/x-javascript text/xml application/xml \
            application/xml+rss text/javascript application/javascript \
            text/x-js;  gzip_buffers 16 8k;  gzip_disable "MSIE [1-6]\.(?!.*SV1)";

from https://developers.google.com/speed/docs/best-practices/caching#LeverageProxyCaching

About The Author

Cédric Walter

I worked with various Insurances companies across Switzerland on online applications handling billion premium volumes. I love to continuously spark my creativity in many different and challenging open-source projects fueled by my great passion for innovation and blockchain technology. In my technical role as a senior software engineer and Blockchain consultant, I help to define and implement innovative solutions in the scope of both blockchain and traditional products, solutions, and services. I can support the full spectrum of software development activities, starting from analyzing ideas and business cases and up to the production deployment of the solutions. I'm the Founder and CEO of Disruptr GmbH.

Categories

brands

 
 
Cordalo simplify writing Corda applications.
 
tokens-economy.com is a blog / digital playground where Cédric keep track of new developments in the distributed ledger technology space and present all his experimentation and tools, promoting the understanding of digital currencies and assets.
 
Galaxiis premium joomla extensions and plugins
 
Supercars-central.com is a blog about the Audi R8 Spyder V10 and more...