]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_deflate.html
add a comment about the gzip-only-text/html note
[apache] / docs / manual / mod / mod_deflate.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4 <html xmlns="http://www.w3.org/1999/xhtml">
5   <head>
6     <meta name="generator" content="HTML Tidy, see www.w3.org" />
7
8     <title>Apache module mod_deflate</title>
9   </head>
10   <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
11
12   <body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
13   vlink="#000080" alink="#FF0000">
14     <!--#include virtual="header.html" -->
15
16     <h1 align="CENTER">Module mod_deflate</h1>
17
18     <p>This module provides the ability to compress content before
19     it is delivered to the client.</p>
20
21     <p><a href="module-dict.html#Status"
22     rel="Help"><strong>Status:</strong></a> Experimental<br />
23      <a href="module-dict.html#SourceFile"
24     rel="Help"><strong>Source File:</strong></a>
25     mod_deflate.c<br />
26      <a href="module-dict.html#ModuleIdentifier"
27     rel="Help"><strong>Module Identifier:</strong></a>
28     deflate_module<br />
29      <a href="module-dict.html#Compatibility"
30     rel="Help"><strong>Compatibility:</strong></a> Available in
31     Apache 2.0 and later.</p>
32
33     <h2>Summary</h2>
34
35     <p>The experimental <samp>mod_deflate</samp> module allows 
36     output from your server to be compressed before being sent
37     to the client over the network.</p>
38
39     <h2>Directives</h2>
40
41     <ul>
42       <li><a href="#DeflateFilterNote">DeflateFilterNote</a></li>
43
44       <li><a href="#DeflateWindowSize">DeflateWindowSize</a></li>
45
46       <li><a href="#DeflateMemLevel">DeflateMemLevel</a></li>
47     </ul>
48
49     <p>See also: <a href="mod_mime.html#addoutputfilter">
50     AddOutputFilter</a> and <a href="core.html#setoutputfilter">
51     SetOutputFilter</a>
52
53     <h2>Enabling Compression</h2>
54
55     <p>Compression is implemented by the <code>DEFLATE</code>
56     <a href="../filter.html">filter</a>.  The following directive
57     will enable compression for documents in the container where it
58     is placed:</p>
59     <p><strong>Most popular browsers can not handle compression of all content
60         so you may want to enable the 'gzip-only-text/html' note (see below)
61     </strong></p>
62
63     <blockquote>
64       <code>SetEnv gzip-only-text/html 1</code><br />
65       <code>SetOutputFilter DEFLATE</code>
66     </blockquote>
67
68     <p>Here is an example of enabling compression for the Apache
69     documentation:</p>
70
71     <blockquote>
72       <code>&lt;Directory "/your-server-root/manual"&gt;<br />
73       SetEnv gzip-only-text/html 1<br />
74       SetOutputFilter DEFLATE</code><br />
75       <em>leave the existing directives as-is</em><br />
76       <code>&lt;/Directory&gt;</code>
77     </blockquote>
78
79     <hr />
80     <!-- the HR is part of the directive description -->
81
82     <h2><a id="DeflateFilterNote" name="DeflateFilterNote">DeflateFilterNote
83     directive</a></h2>
84
85     <p><a href="directive-dict.html#Syntax"
86     rel="Help"><strong>Syntax:</strong></a> DeflateFilterNote <em>notename
87     </em><br />
88      <a href="directive-dict.html#Default"
89     rel="Help"><strong>Default:</strong></a> <i>none</i><br />
90      <a href="directive-dict.html#Context"
91     rel="Help"><strong>Context:</strong></a> server config<br />
92      <a href="directive-dict.html#Override"
93     rel="Help"><strong>Override:</strong></a> none<br />
94      <a href="directive-dict.html#Status"
95     rel="Help"><strong>Status:</strong></a> Experimental<br />
96      <a href="directive-dict.html#Module"
97     rel="Help"><strong>Module:</strong></a> mod_deflate<br />
98      <a href="directive-dict.html#Compatibility"
99     rel="Help"><strong>Compatibility:</strong></a> Apache 2.0 and
100     above</p>
101
102     <p>The DeflateFilterNote directive specifies that a note about
103     compression ratios should be attached to the request.  The name
104     of the note is the value specified for the directive.</p>
105
106     <hr />
107     <!-- the HR is part of the directive description -->
108
109     <h2><a id="DeflateWindowSize"
110     name="DeflateWindowSize">DeflateWindowSize directive</a></h2>
111
112     <p><a href="directive-dict.html#Syntax"
113     rel="Help"><strong>Syntax:</strong></a> DeflateWindowSize
114     <em>value</em><br />
115      <a href="directive-dict.html#Default"
116     rel="Help"><strong>Default:</strong></a> <em>none</em><br />
117      <a href="directive-dict.html#Context"
118     rel="Help"><strong>Context:</strong></a> server config<br />
119      <a href="directive-dict.html#Override"
120     rel="Help"><strong>Override:</strong></a> none<br />
121      <a href="directive-dict.html#Status"
122     rel="Help"><strong>Status:</strong></a> Experimental<br />
123      <a href="directive-dict.html#Module"
124     rel="Help"><strong>Module:</strong></a> mod_deflate<br />
125      <a href="directive-dict.html#Compatibility"
126     rel="Help"><strong>Compatibility:</strong></a> Apache 2.0 and
127     above</p>
128
129     <p>The <samp>DeflateWindowSize</samp> directive specifies the
130     zlib compression window size.</p>
131
132     <hr />
133     <!-- the HR is part of the directive description -->
134
135     <h2><a id="DeflateMemLevel" name="DeflateMemLevel">DeflateMemLevel
136     directive</a></h2>
137
138     <p><a href="directive-dict.html#Syntax"
139     rel="Help"><strong>Syntax:</strong></a> DeflateMemLevel
140     <em>value</em><br />
141      <a href="directive-dict.html#Default"
142     rel="Help"><strong>Default:</strong></a> <em>none</em><br />
143      <a href="directive-dict.html#Context"
144     rel="Help"><strong>Context:</strong></a> server config<br />
145      <a href="directive-dict.html#Override"
146     rel="Help"><strong>Override:</strong></a> none<br />
147      <a href="directive-dict.html#Status"
148     rel="Help"><strong>Status:</strong></a> Experimental<br />
149      <a href="directive-dict.html#Module"
150     rel="Help"><strong>Module:</strong></a> mod_deflate<br />
151      <a href="directive-dict.html#Compatibility"
152     rel="Help"><strong>Compatibility:</strong></a> Apache 2.0 and
153     above</p>
154
155     <p>The DeflateMemLevel directive specifies the amount of
156     memory available to zlib for compression.</p>
157     <!--#include virtual="footer.html" -->
158   </body>
159 </html>
160