summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorEric Covener <covener@apache.org>2013-08-26 16:54:17 +0200
committerEric Covener <covener@apache.org>2013-08-26 16:54:17 +0200
commit59aa86e3a9dca68f9692e2dce05ddb945d331357 (patch)
tree824acab2758a6f47c6d2d8f297237810eda3876b /docs
parentPR55352: mention in the <Proxy> manual that the matching is a prefix only, not (diff)
downloadapache2-59aa86e3a9dca68f9692e2dce05ddb945d331357.tar.xz
apache2-59aa86e3a9dca68f9692e2dce05ddb945d331357.zip
remove cache-busting workarounds for ancient browsers. Add more mimetypes to
the "simple" example. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1517551 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs')
-rw-r--r--docs/manual/mod/mod_deflate.xml69
1 files changed, 3 insertions, 66 deletions
diff --git a/docs/manual/mod/mod_deflate.xml b/docs/manual/mod/mod_deflate.xml
index 9e92608036..6452800be0 100644
--- a/docs/manual/mod/mod_deflate.xml
+++ b/docs/manual/mod/mod_deflate.xml
@@ -38,38 +38,11 @@ client</description>
<seealso><a href="../filter.html">Filters</a></seealso>
<section id="recommended"><title>Sample Configurations</title>
- <p>This is a simple sample configuration for the impatient.</p>
+ <p>This is a simple configuration that compresses common text-based content types.</p>
<example><title>Compress only a few types</title>
<highlight language="config">
- AddOutputFilterByType DEFLATE text/html text/plain text/xml
- </highlight>
- </example>
-
- <p>The following configuration, while resulting in more compressed content,
- is also much more complicated. Do not use this unless you fully understand
- all the configuration details.</p>
-
- <example><title>Compress everything except images</title>
- <highlight language="config">
-&lt;Location /&gt;
- # Insert filter
- SetOutputFilter DEFLATE
-
- # Netscape 4.x has some problems...
- BrowserMatch ^Mozilla/4 gzip-only-text/html
-
- # Netscape 4.06-4.08 have some more problems
- BrowserMatch ^Mozilla/4\.0[678] no-gzip
-
- # MSIE masquerades as Netscape, but it is fine
- BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
- # Don't compress images
- SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
-
- # Make sure proxies don't deliver the wrong content
- Header append Vary User-Agent env=!dont-vary
-&lt;/Location&gt;
+ AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
</highlight>
</example>
@@ -85,14 +58,9 @@ client</description>
<highlight language="config">
SetOutputFilter DEFLATE
+ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
</highlight>
- <p>Some popular browsers cannot handle compression of all content
- so you may want to set the <code>gzip-only-text/html</code> note to
- <code>1</code> to only allow html files to be compressed (see
- below). If you set this to <em>anything but <code>1</code></em> it
- will be ignored.</p>
-
<p>If you want to restrict the compression to particular MIME types
in general, you may use the <directive module="mod_filter"
>AddOutputFilterByType</directive> directive. Here is an example of
@@ -105,37 +73,6 @@ client</description>
&lt;/Directory&gt;
</highlight>
- <p>For browsers that have problems even with compression of all file
- types, use the <directive module="mod_setenvif"
- >BrowserMatch</directive> directive to set the <code>no-gzip</code>
- note for that particular browser so that no compression will be
- performed. You may combine <code>no-gzip</code> with <code
- >gzip-only-text/html</code> to get the best results. In that case
- the former overrides the latter. Take a look at the following
- excerpt from the <a href="#recommended">configuration example</a>
- defined in the section above:</p>
-
- <highlight language="config">
-BrowserMatch ^Mozilla/4 gzip-only-text/html
-BrowserMatch ^Mozilla/4\.0[678] no-gzip
-BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
- </highlight>
-
- <p>At first we probe for a <code>User-Agent</code> string that
- indicates a Netscape Navigator version of 4.x. These versions
- cannot handle compression of types other than
- <code>text/html</code>. The versions 4.06, 4.07 and 4.08 also
- have problems with decompressing html files. Thus, we completely
- turn off the deflate filter for them.</p>
-
- <p>The third <directive module="mod_setenvif">BrowserMatch</directive>
- directive fixes the guessed identity of the user agent, because
- the Microsoft Internet Explorer identifies itself also as "Mozilla/4"
- but is actually able to handle requested compression. Therefore we
- match against the additional string "MSIE" (<code>\b</code> means
- "word boundary") in the <code>User-Agent</code> Header and turn off
- the restrictions defined before.</p>
-
<note><title>Note</title>
The <code>DEFLATE</code> filter is always inserted after RESOURCE
filters like PHP or SSI. It never touches internal subrequests.