# Apache2 mod\_deflate does not work

**URL:** <https://www.ruby-forum.com/t/apache2-mod-deflate-does-not-work/74110>\
**Category:** Rails\
**Created:** [October 30, 2006, 2:32pm UTC](https://www.ruby-forum.com/t/apache2-mod-deflate-does-not-work/74110 "2006-10-30T14:32:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ethan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8dc957/32.png) [@ethan](https://www.ruby-forum.com/u/ethan)\
**Post date:** [October 30, 2006, 2:32pm UTC](https://www.ruby-forum.com/t/apache2-mod-deflate-does-not-work/74110/1 "2006-10-30T14:32:01Z")

</div>

hi,  
when i use mongrel\_cluster in my web application(which is hosted by  
apache2), i setup apache2 mod\_deflate to save traffic,however,i found  
deflate did not work with js and css module,i know deflate could be used  
to compress javascript,but i dont know why it could not work with js and  
css?can some one give me an idea?  
thanks!

following is my apache2 config part of the mod\_deflate :

```
#Deflate
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/plain text/xml 

```

application/xml application/xhtml+xml text/javascript text/css  
BrowserMatch ^Mozilla/4 gzip-only-text/html  
BrowserMatch ^Mozilla/4.0[678] no-gzip  
BrowserMatch bMSIE !no-gzip !gzip-only

```
DeflateFilterNote Input input_info
DeflateFilterNote Output output_info
DeflateFilterNote Ratio ratio_info
LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' 

```

deflate

and here is the deflate logs:

“GET /stylesheets/app.css?1161256256 HTTP/1.0” -/- (-%)  
“GET /stylesheets/util.css?1160272162 HTTP/1.0” -/- (-%)  
“GET /javascripts/prototype.js?1156841434 HTTP/1.0” -/- (-%)  
“GET /javascripts/effects.js?1156841388 HTTP/1.0” -/- (-%)  
“GET /javascripts/dragdrop.js?1156841306 HTTP/1.0” -/- (-%)  
“GET /javascripts/application.js?1158550499 HTTP/1.0” -/- (-%)

---

<div class="post-metadata">

**Author:** ![ethan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8dc957/32.png) [@ethan](https://www.ruby-forum.com/u/ethan)\
**Post date:** [October 30, 2006, 4:26pm UTC](https://www.ruby-forum.com/t/apache2-mod-deflate-does-not-work/74110/2 "2006-10-30T16:26:51Z")

</div>

The above log is got under IE6 and now i get them from FF1.5,i can see  
that javascripts and stylesheets are compressed well(about 1/4 of the  
original size).  
That is to say,IE6 does not support the receiving of compressed js?

---

<div class="post-metadata">

**Author:** ![ethan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8dc957/32.png) [@ethan](https://www.ruby-forum.com/u/ethan)\
**Post date:** [November 6, 2006, 5:54am UTC](https://www.ruby-forum.com/t/apache2-mod-deflate-does-not-work/74110/3 "2006-11-06T05:54:31Z")

</div>

ethan wrote:

> That is to say,IE6 does not support the receiving of compressed js?

BrowserMatch bMSIE !no-gzip !gzip-only

This probably wants to be \bMSIE or just MSIE. If it’s not matching,  
the previous Netscape-4 blocking lines (which can’t handle gzipped  
JS/CSS) will apply to IE (which can) too.
