August 2017
Intermediate to advanced
278 pages
8h 53m
English
If the performance hit from gzipping the files on the fly is too much, NGINX also allows the ability to precompress the files to serve. While this means that there's a bit of extra maintenance work required, this can be incorporated into an existing build process (such as Grunt or Gulp) to reduce the steps required.
To enable in NGINX, we modify our gzip.conf file to look like the following code:
gzip on; gzip_static on; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; gzip_proxied any; gzip_types text/plain text/css application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml; gzip_vary on;
With gzip_static set to on, NGINX will serve the precompressed ...
Read now
Unlock full access