I have a rails app that uses heavily js (over 1MB total). I’d like to compress them in order to reduce the overall load time of the site.
I did a fast search and found that most browsers accept compressed content.
I’d like to know what can I do to make my rails app send compressed content and thus make the user experience better.
You should always have the web server proxying to your mongrels handle the serving of static content and it’s compression. Requests for static content should never be passed to the mongrels.
e.g. with nginx it’s simply a matter of adding gzip directives to your config file.
http://topfunky.net/svn/shovel/nginx/conf/nginx.conf