How to tell if mod_deflate is actually working?

Posted by Jayraj on Server Fault See other posts from Server Fault or by Jayraj
Published on 2011-11-26T01:00:37Z Indexed on 2011/11/26 1:53 UTC
Read the original article Hit count: 710

Filed under:
|
|

I have put the following in my http.conf file:

# mod_deflate configuration
<IfModule mod_deflate.c>

# Restrict compression to these MIME types
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/css

# Level of compression (Highest 9 - Lowest 1)
DeflateCompressionLevel 9

# 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 \bMSI[E] !no-gzip !gzip-only-text/html

<IfModule mod_headers.c>
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>

</IfModule>

My content doesn't return with a Content-Encoding of type gzip, but I find myself getting a lot more 304s and the Etag is appended with a +gzip suffix. Is mod_deflate actually doing its job? (Sorry about the n00b-ishness)

© Server Fault or respective owner

Related posts about apache2

Related posts about gzip