HTTP gzip static directives

gzip_static directive

HTTP/server/location; default off. Optional module serves precompressed siblings; always bypasses negotiation.

Formal Syntax & Structure

nginx syntaxnginx
gzip_static on | off | always;

Parameters & Attributes

NameTypeDescription
modeon | off | alwaysUse existing .gz assets; always ignores client encoding support, so plan decompression or compatible clients.

Working Example

Example Snippetnginx
gzip_static on;
Nginx Reference