Loading...
gzip on;gzip on;
gzip_types text/css application/javascript application/json image/svg+xml;
gzip_min_length 1024;
gzip_vary on;Nginx compresses only 'text/html' by default, so other text types must be listed; tiny files are skipped.
Vary: Accept-Encoding and the right Content-Encoding.No. They are already compressed, so Gzip saves almost nothing and wastes CPU. SVG is text and does benefit.
Run curl -sI -H 'Accept-Encoding: gzip' URL and look for 'Content-Encoding: gzip', or check the response headers in DevTools.
Yes, as a fallback for clients that do not send 'br' in Accept-Encoding, such as some tools and older clients.