Tuesday, May 16 2006
no comments
Don't keep the user waiting while your favorite Javascript library are streamed down the wire. Keep the download small and your users will thank you for it! All you need is a simple snippet inside your lighttpd.conf file:
# this assumes that mod_compress is loaded
compress.cache-dir = "/var/lighttpd/cache/compress/"
compress.filetype = ("text/plain",
"text/html",
"text/javascript",
"text/css",
"application/xml")
That's all folks! Without fussing with risky source altering Javascript compressors. Just let lighttpd gzip the content before transmitting over to the browser. Some results for the Javascript files shipped with rails:
| File | Size in bytes | Compressed |
| prototype.js | 55149 | 12466 |
| effects.js | 32871 | 7278 |
| controls.js | 28036 | 7246 |
| dragdrop.js | 29435 | 7112 |
did I say that it works on styleseets too?
Bits and pieces about Me glued together by Me!
links
SuprTags
archives
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005




Comments