O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Enabling GZIP compression

Let's examine the nginx configuration settings related to enable GZIP compression.

We set the gzip directive to on to enable the gzipping of server responses.

The gzip_min_length directive allows us to specify the minimum length of a response that will be gzipped.

The gzip_buffers directive sets the number and size of buffers that are used to compress the response. We have specified that we will be using 16 buffers with a memory page size of 8K.

The gzip_types directive allows us to specify the MIME types that we should enable GZIP compression on in addition to text/HTML. We have specified the MIME types for plain text files, JavaScript source files, and CSS source files.

The gzip_vary directive is used to either ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required