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
Assign a Static IP Address to Docker Container Read tip
How to Wait or Pause in Node.js Read tip
Using ES Modules in Node.js Read tip