how to compress javascript files served from my rails app running on apache/passenger? how to compress javascript files served from my rails app running on apache/passenger? apache apache

how to compress javascript files served from my rails app running on apache/passenger?


Jammit is an industrial strength asset packaging library for Rails, providing both the CSS and JavaScript concatenation and compression that you'd expect, as well as YUI Compressor and Closure Compiler compatibility, ahead-of-time gzipping, built-in JavaScript template support, and optional Data-URI / MHTML image and font embedding.

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


Assuming that you are using capistrano, add a deployment task that compresses our javascript files in-place on the production server.

Check this:http://blog.jcoglan.com/2007/05/26/make-capistrano-compress-your-javascript-and-css-automatically/