]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_deflate.xml
Fixed some XML-issues.
[apache] / docs / manual / mod / mod_deflate.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <modulesynopsis>
5
6 <name>mod_deflate</name>
7 <description>Compress content before
8     it is delivered to the client</description>
9 <status>Extension</status>
10 <sourcefile>mod_deflate.c</sourcefile>
11 <identifier>deflate_module</identifier>
12
13 <summary>
14     <p>The <module>mod_deflate</module> module provides
15     the <code>DEFLATE</code> output filter that allows output from
16     your server to be compressed before being sent to the client over
17     the network.</p>
18 </summary>
19 <seealso><directive module="mod_mime">AddOutputFilter</directive></seealso>
20 <seealso><directive module="core">SetOutputFilter</directive></seealso>
21
22 <section><title>Enabling Compression</title>
23
24     <p>Compression is implemented by the <code>DEFLATE</code>
25     <a href="../filter.html">filter</a>. The following directive
26     will enable compression for documents in the container where it
27     is placed:</p>
28     <p><strong>Most popular browsers can not handle compression of all content
29         so you may want to set the 'gzip-only-text/html' note to 1 to only 
30         allow html files to be compressed (see below).</strong></p>
31     <p><strong>If you set this to anything but '1' it will be ignored, so you can do
32        negative matches.</strong></p>
33
34 <example>SetEnv gzip-only-text/html 1<br />
35 SetOutputFilter DEFLATE
36 </example>
37
38     <p>Here is an example of enabling compression for the Apache
39     documentation:</p>
40
41 <example>
42 &lt;Directory "/your-server-root/manual"&gt;<br />
43       SetEnv gzip-only-text/html 1<br />
44       SetOutputFilter DEFLATE<br />
45 &lt;/Directory&gt;
46 </example>
47 </section>
48
49 <directivesynopsis>
50 <name>DeflateFilterNote</name>
51 <description>Places the compression ratio in a note for logging</description>
52 <syntax>DeflateFilterNote <em>notename</em></syntax>
53 <contextlist><context>server config</context><context>virtual host</context>
54 </contextlist>
55
56 <usage>
57     <p>The <directive>DeflateFilterNote</directive> directive
58     specifies that a note about compression ratios should be attached
59     to the request. The name of the note is the value specified for
60     the directive.</p>
61 </usage>
62 </directivesynopsis>
63
64 <directivesynopsis>
65 <name>DeflateBufferSize</name>
66 <description>Fragment size to be compressed at one time by zlib</description>
67 <syntax>DeflateBufferSize <em>value</em></syntax>
68 <default>DeflateBufferSize 8096</default>
69 <contextlist><context>server config</context><context>virtual host</context>
70 </contextlist>
71
72 <usage>
73     <p>The <directive>DeflateBufferSize</directive> directive specifies
74     the size in bytes of the fragments that zlib should compress at one
75     time.</p>
76 </usage>
77 </directivesynopsis>
78
79 <directivesynopsis>
80 <name>DeflateWindowSize</name>
81 <description>Zlib compression window size</description>
82 <syntax>DeflateWindowSize <em>value</em></syntax>
83 <default>DeflateWindowSize 15</default>
84 <contextlist><context>server config</context><context>virtual host</context>
85 </contextlist>
86
87 <usage>
88     <p>The <directive>DeflateWindowSize</directive> directive specifies the
89     zlib compression window size (a value between 1 and 15).</p>
90 </usage>
91 </directivesynopsis>
92
93 <directivesynopsis>
94 <name>DeflateMemLevel</name>
95 <description>How much memory should be used by zlib for compression</description>
96 <syntax>DeflateMemLevel <em>value</em></syntax>
97 <default>DeflateMemLevel 9</default>
98 <contextlist><context>server config</context><context>virtual host</context>
99 </contextlist>
100
101 <usage>
102     <p>The <directive>DeflateMemLevel</directive> directive specifies
103     how much memory should be used by zlib for compression
104     (a value between 1 and 9).</p>
105 </usage>
106 </directivesynopsis>
107
108 </modulesynopsis>
109