[Solar-talk] Squished JS and CSS

Rodrigo Moraes rodrigo.moraes at gmail.com
Sat Dec 23 14:15:07 PST 2006


On 12/23/06, Clay Loveless wrote:
> AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
> text/javascript
> DeflateCompressionLevel 5
>
> (Apache 2)

Thanks! This is exactly what I needed but didn't knew this directive.
Indeed, parsing with PHP seemed insane the first time I saw it, and
the Apache is much better. :-)

Yesterday I set the autoprepend trick to gzip the javascript, and the
whole YUI-ext which is 275KB becomes 60KB compressed (according to
Firebug). The components I really use, including YUI's base utilities,
are about 180KB when everything is loaded and, compressed, the browser
loads only 45KB. Nothing bad, and I didn't knew it was that good to
serve compressed javascript. I'll move to the Apache solution and
start to use that, instead.

Thanks!

Now, Merry Christmas to everybody. :-)

rodrigo

---------------------------------------------------------------------
Solar has now a Community Wiki: solarphp.org
---------------------------------------------------------------------
Join the #solarphp IRC channel on freenode.org
---------------------------------------------------------------------


More information about the solar-talk mailing list