Wed 23 Jan 2008
I almost never post links to other blogs posts, but I thought this was cool.
Leon Chevalier from AcidDrop.com (is this the worst name for a blog designed to showcase one’s professional skills or just in the top 5?) has created a PHP class (latest version) that will automatically package and minify all your CSS and JS.
I was playing around with it to see if there was anything extra Leon was doing that my CakePHP Asset Packer wasn’t. One thing I found interesting is that the actual cached CSS and JS are stored as PHP files. This is done so that PHP can set the expires headers and gzip the contents. Granted this should/could be done with the actual web server, but many shared hosts don’t allow this. Even so I’m not really sure doing this is a great idea, since you’re essentially trading process time for network time.
From the comments it seems like people are having success using this with their WordPress sites. It would make sense to roll the whole thing into a plugin.










Follow!
Email!