Fleegix.org

Vitamin article on serving JavaScript fast

2006-05-24 03:25:00

Just read a nice article over on Vitamin about Serving JavaScript fast, written by Cal Henderson from Flickr.

He touches on a pretty broad range of techniques -- caching, reducing the number connections for downloading, loading your JS libraries asynchronously, or compressing them.

The compression techniques he mentions include both simple gzipping and pre-procesing the file with something like the Dojo Compressor that strips whitespace and comments, and shortens the names of privately scoped variables.

There's also some interesting stuff about caching where he explains how to use aggressive caching with PHP and then use Apache's mod_rewrite to redirect requests for JS and CSS files to the proper version of a file -- instead of using the standard hack of adding a query string on the end to make the browser grab a fresh copy.

About

This is the blog for Matthew Eernisse. I currently work at Yammer as a developer, working mostly with JavaScript. All opinions expressed here are my own, not my employer's.

Related

Previous posts

All previous posts ยป

This blog is a GeddyJS application.