Lighttpd css javascript js compress tip
Posted by paolo on 29 April, 2007
I don’t know why I haven’t thinked about it before, but with lighttpd it is possible in 30 seconds to manage sending the Java-Scripts and the CSSs compressed to the browsers, saving a lot of bandwidth against a little use of CPU.
I just added “mod_compress” to the list of modules in the array “server.modules” and
# {{{ mod_compress
compress.cache-dir = “/var/www/cache/”
compress.filetype = (”text/css”, “text/javascript” )
#
in the /etc/lighttpd/lighttpd.conf file. Obviously I created the directory /var/www/cache giving to it the permission needed by lighttpd to write there.
That’s it. And that’s only a little part of the unlimited powers of Lighttpd!
Posted in Lighttpd, Programming, css, javascript | 1 Comment »



