Skip to content

A Better Minimum Compression Size in Nginx

View on Twitter

💡 Compressing anything that's small is unlikely to shrink much. In some cases, it even make it bigger!

👉🏼 That's why I always make sure to set "gzip_min_length" in Nginx to something higher than the default.

Set gzip_min_length directive to 256 to tell Nginx to start compressing at a bigger size. Default value of 20 usually leads to larger files after gzipping because of the small size.

Download the VPS Security Cheatsheet

Use this FREE security cheatsheet to not miss a step when securing your VPS.

A preview of the VPS Security Cheatsheet.

You'll also get tips on building scalable Node.js applications about twice a month. I respect your email privacy. Unsubscribe any time.

You might also like
Colour Contrast for Accessibility Read tip
Measure Execution Time With console.time Read tip
Programatically Check If System Requires Restart Read tip