nginx_compression
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
nginx_compression [2016/02/20 17:51] – luke7858 | nginx_compression [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 8: | Line 8: | ||
<sxh bash> | <sxh bash> | ||
gzip on; | gzip on; | ||
- | gzip_disable "msie6"; | + | gzip_disable "MSIE [1-6]\.(? |
gzip_vary on; | gzip_vary on; | ||
gzip_proxied any; | gzip_proxied any; | ||
Line 26: | Line 26: | ||
^ Value ^ Description ^ | ^ Value ^ Description ^ | ||
| gzip on | turns on compressions | | | gzip on | turns on compressions | | ||
- | | gzip_proxied | By default, NGINX does not compress responses to proxied requests (requests that come from the proxy server). The fact that a request comes from a proxy server is determined by the presence of the Via header field in the request. To configure compression of these responses, use the gzip_proxied directive. The directive has a number of parameters specifying which kinds of proxied requests NGINX should compress| | + | | gzip_disable | disables gzip compression for browsers that don't support it (in this case MS Internet Explorer before version 6 SV1). | |
+ | | gzip_vary on | This sets the response header Vary: Accept-Encoding. Some proxies have a bug in that they serve compressed content to browsers that don't support it. By setting the Vary: Accept-Encoding header, you instruct proxies to store both a compressed and uncompressed version of the content.| | ||
+ | | gzip_proxied | By default, NGINX does not compress responses to proxied requests (requests that come from the proxy server). The fact that a request comes from a proxy server is determined by the presence of the Via header field in the request. To configure compression of these responses, use the gzip_proxied directive. The directive has a number of parameters specifying which kinds of proxied requests NGINX should compress | ||
+ | | gzip_comp_level | This is the compression level (between 1 and 9) where 1 is the least compression (fastest) and 9 is the most (slowest). | ||
| gzip_types | By default, NGINX compresses responses only with MIME type text/html | | | gzip_types | By default, NGINX compresses responses only with MIME type text/html | | ||
\\ | \\ | ||
- | <sxh bash> | ||
- | </ | ||
- | |||
- | <sxh bash> | ||
- | |||
- | </ | ||
=== Testing Compression === | === Testing Compression === | ||
Has your compression been configured correctly? | Has your compression been configured correctly? |
nginx_compression.1455990718.txt.gz · Last modified: 2024/05/23 07:26 (external edit)