Skip to content

A Better Minimum Compression Size in Nginx

💡 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.
A preview of the VPS Security Cheatsheet.

Download the VPS Security Cheatsheet

No spam! 🙅🏻‍♀️ Unsubscribe at any time.