From 6fa9cbb0572f5fe75e0572cb40527d1ee36f73f7 Mon Sep 17 00:00:00 2001
From: Christophe Jaillet
Date: Fri, 15 Feb 2019 12:13:31 +0000
Subject: [PATCH] Add directive name, so that quickreference.xsl can extract
default value correctly.
Always align on the left code in block in order to be consistent and fix a layout issue.
Add some links between directives.
(r1853637 in trunk)
+ remove some trailing spaces
+ improve an example to have it more simple (r1816989 in trunk)
to synch with trunk
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1853640 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/mod/mod_deflate.xml | 63 +++++++++++++++------------------
1 file changed, 28 insertions(+), 35 deletions(-)
diff --git a/docs/manual/mod/mod_deflate.xml b/docs/manual/mod/mod_deflate.xml
index aa85def0a5d..bca9701b7ab 100644
--- a/docs/manual/mod/mod_deflate.xml
+++ b/docs/manual/mod/mod_deflate.xml
@@ -55,8 +55,8 @@ client
Compress only a few types
- AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
-
+AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
+
@@ -171,7 +171,7 @@ SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip
filter depends on the User-Agent, you should add:
- Header append Vary User-Agent
+Header append Vary User-Agent
If your decision about compression depends on other information
@@ -181,15 +181,15 @@ SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip
Example
- Header set Vary *
-
+Header set Vary *
+
Serving pre-compressed
content
- Since mod_deflate re-compresses content each
+
Since mod_deflate re-compresses content each
time a request is made, some performance benefit can be derived by
pre-compressing the content and telling mod_deflate to serve them
without re-compressing them. This may be accomplished using a
@@ -197,29 +197,23 @@ content
<IfModule mod_headers.c>
- # Serve gzip compressed CSS files if they exist
+ # Serve gzip compressed CSS and JS files if they exist
# and the client accepts gzip.
RewriteCond "%{HTTP:Accept-encoding}" "gzip"
RewriteCond "%{REQUEST_FILENAME}\.gz" -s
- RewriteRule "^(.*)\.css" "$1\.css\.gz" [QSA]
-
- # Serve gzip compressed JS files if they exist
- # and the client accepts gzip.
- RewriteCond "%{HTTP:Accept-encoding}" "gzip"
- RewriteCond "%{REQUEST_FILENAME}\.gz" -s
- RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA]
+ RewriteRule "^(.*)\.(css|js)" "$1\.$2\.gz" [QSA]
# Serve correct content types, and prevent mod_deflate double gzip.
RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1]
- RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1]
+ RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1]
<FilesMatch "(\.js\.gz|\.css\.gz)$">
# Serve correct encoding type.
Header append Content-Encoding gzip
- # Force proxies to cache gzipped &
+ # Force proxies to cache gzipped &
# non-gzipped css/js files separately.
Header append Vary Accept-Encoding
</FilesMatch>
@@ -245,11 +239,11 @@ content
Example
- DeflateFilterNote ratio
-
- LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate
- CustomLog "logs/deflate_log" deflate
-
+DeflateFilterNote ratio
+
+LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate
+CustomLog "logs/deflate_log" deflate
+
If you want to extract more accurate values from your logs, you
@@ -365,7 +359,7 @@ CustomLog "logs/deflate_log" deflate
2.4.10 and later
- The DeflateInflateLimitRequestBody directive
+
The DeflateInflateLimitRequestBody directive
specifies the maximum size of an inflated request body. If it is unset,
LimitRequestBody is applied to the
inflated body.
@@ -376,38 +370,37 @@ CustomLog "logs/deflate_log" deflate
DeflateInflateRatioLimit
Maximum inflation ratio for request bodies
DeflateInflateRatioLimit value
-200
+DeflateInflateRatioLimit 200
server configvirtual host
directory.htaccess
2.4.10 and later
- The DeflateInflateRatioLimit directive
- specifies the maximum ratio of deflated to inflated size of an
+
The DeflateInflateRatioLimit directive
+ specifies the maximum ratio of deflated to inflated size of an
inflated request body. This ratio is checked as the body is
- streamed in, and if crossed more than
- DeflateInflateRatioBurst times, the request
- will be terminated.
+ streamed in, and if crossed more than
+ DeflateInflateRatioBurst
+ times, the request will be terminated.
DeflateInflateRatioBurst
-Maximum number of times the inflation ratio for request bodies
+Maximum number of times the inflation ratio for request bodies
can be crossed
DeflateInflateRatioBurst value
-3
+DeflateInflateRatioBurst 3
server configvirtual host
directory.htaccess
2.4.10 and later
- The DeflateInflateRatioBurst directive
- specifies the maximum number of times the
- DeflateInflateRatioLimit can be crossed before
- terminating the request.
+ The DeflateInflateRatioBurst directive
+ specifies the maximum number of times the
+ DeflateInflateRatioLimit can
+ be crossed before terminating the request.
-
--
2.47.3