PayPlay.FM development.log

Thursday, May 24, 2007

JS/CSS caching in Rails 2.0

In order to remove extra HTTP connections because of small files, we use Asset Packager plugin. It makes one big JS or CSS file from all your assets making it faster to load for clients.
Bad thing is that I had to reset all HTML cache every time after deployment because svn revision is added to name of base.js. I bet it can be easily changed, but I had no time to check.

I've just found that this behavior will be standard in Rails 2.0 - if you are in production mode just add :cache=>true to javascript_include_tag. That's cool.
Plugins are great but it is always better to have it out of the box.

Labels: , , ,

0 Comments:

Post a Comment

<< Home