Directive reference
gzip
Enables gzip response compression.
| Syntax | gzip on | off; |
|---|---|
| Contexts | httpserverlocationif in location |
| Default | gzip off; |
Behavior
Eligibility also depends on status, content type, minimum length, existing Content-Encoding and the client's Accept-Encoding header.
Example
gzip on;
gzip_types text/plain text/css application/json; Related directives
gzip_types · gzip_min_length