[Solar-talk] Squished JS and CSS

Clay Loveless clay at killersoft.com
Sat Dec 23 13:22:12 PST 2006


On Dec 23, 2006, at 1:07 PM, Rodrigo Moraes wrote:

> And what about the idea to force javascript/css gzip using PHP? I
> mean, the technique Dustin Diaz shows here:
>
> http://www.dustindiaz.com/yahoo-event-utility/

Pure insanity, if it's just for the purposes of gzip compression. Try  
benching these three with 'ab':

1. Forcing JS through PHP (fire up that PHP parser ... to do ...  
nothing much!)

2. Static files, no compression other than jsmin

3. jsminified with .htaccess that has something like:

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css  
text/javascript
DeflateCompressionLevel 5

(Apache 2)

If you're using lighty, there are similar options available for  
compression there that would be much, much faster than running text  
files through PHP just to compress them.

-Clay

--
Killersoft.com





More information about the solar-talk mailing list