<ifmodule mod_deflate.c>
Setoutputfilter DEFLATE #必须的, like a switch, tells Apache to compress the content transferred to the browser
Setenvifnocase Request_uri. (?: gif|jpe?g|png) $ no-gzip dont-vary #设置不对后缀gif, jpg,jpeg,png picture file compression
Setenvifnocase Request_uri. (?: Exe|t?gz|zip|bz2|sit|rar) $ no-gzip dont-vary #同上, is not set Exe,tgz,gz ... The files are compressed
Setenvifnocase Request_uri. (?:p df|mov|avi|mp3|mp4|rm) $ no-gzip dont-vary
Addoutputfilterbytype DEFLATE text/* #设置对文件是文本的内容进行压缩, such as text/html text/css Text/plain
Addoutputfilterbytype DEFLATE application/ms* application/vnd* application/postscript application/javascript Application/x-javascript #这段代码你只需要了解application/javascript application/x-javascript This section is ready, The meaning of this paragraph is to compress the JavaScript file
Addoutputfilterbytype DEFLATE application/x-httpd-php application/x-httpd-fastphp #这段是告诉apache对php类型的文件进行压缩
Browsermatch ^MOZILLA/4 gzip-only-text/html # Netscape 4.x There are some problems, so only the compressed file type is text/html
Browsermatch ^mozilla/4.0[678] No-gzip # Netscape 4.06-4.08 There are more problems, so do not turn on compression
Browsermatch \bmsie!no-gzip!gzip-only-text/html # IE will disguise itself as Netscape, but in fact it's no problem
</IfModule>
<ifmodule deflate_module>
Setoutputfilter DEFLATE
# Don ' t compress images and other
Setenvifnocase Request_uri. (?: gif|jpe?g|png) $ no-gzip dont-vary
Setenvifnocase Request_uri. (?: Exe|t?gz|zip|bz2|sit|rar) $ no-gzip dont-vary
Setenvifnocase Request_uri. (?:p df|doc) $ no-gzip dont-vary
Addoutputfilterbytype DEFLATE text/html text/plain text/xml text/css
Addoutputfilterbytype DEFLATE Application/x-javascript
</IfModule>
Apache under the Ifmodule set meaning