Check Gzip and Brotli; configure Gzip in Nginx
Verify the actual response instead of assuming that compression is enabled.
check.uk.app technical team · Reviewed 26 September 2026
Read the measured result
Our checker compares separate requests that ask for identity, gzip and br. Look at Content-Encoding, completion and HTTP status. Dynamic responses may differ, so their sizes are not a reliable percentage-saving calculation.
A Gzip starting point
Place this example in the appropriate existing http or server context. It targets text assets; do not paste it into every location. Preserve your original configuration. Consider compression risks before enabling it on responses containing secrets.
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_comp_level 4;
gzip_types text/plain text/css application/javascript application/json image/svg+xml;Validate before reload
Run nginx -t using your installation’s normal privileges. Reload only after validation succeeds. To roll back, restore the original directives, validate again and reload. Test a sufficiently large CSS or JavaScript file as well as the homepage.
nginx -t
curl -sS -D - -o /dev/null -H 'Accept-Encoding: gzip' https://example.com/assets/app.cssBrotli is a separate capability
These directives enable Gzip, not Brotli. Check whether your Nginx build or CDN provides Brotli before adding module-specific directives. The public response is the final evidence: a proxy can change the encoding sent by your origin.