How to compress javascript files from my rails application to apache / passenger?

I am using Apache 2.2, Passenger 3.0.2, Rails 3.

I was able to compress the css file by changing the deflate.conf file. However, when I run firefox addon yslow, it still says javascript files are uncompressed.

<IfModule mod_deflate.c>
          AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript text/javascript application/x-javascript
</IfModule>

Above, I use all three options: "application / javascript text / javascript application / x-javascript", but no luck.

Here is the message from yslow:

Level D on gzip compress components

There are 3 simple text components that need to be sent compressed.

* http://myhost.dyndns.org:8080/javascripts/jquery-1.4.2.min.js?...
* http://myhost.dyndns.org:8080/javascripts/jquery.validate.min.js?...
* http://myhost.dyndns.org:8080/javascripts/rails.js?...
+5
source share
2 answers

Jammit - Rails, CSS JavaScript, YUI Closure, gzipping, JavaScript Data-URI/MHTML.

http://documentcloud.github.com/jammit/

+3

All Articles