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
| Name | Type | Description |
|---|---|---|
| mode | on | off | always | Use existing .gz assets; always ignores client encoding support, so plan decompression or compatible clients. |
Working Example
Example Snippetnginx
gzip_static on;