Maximizing Performance with Compression and Combination
Written by on December 20th, 2006 in Ajax News.
We are having fun watching Firebug’s network mode as we visit various sites, and seeing where the browser spends time waiting.
Yesterday we talked about cheating the system by using CNAMES to get around the number of connections per host limitation.
Today, Niels Leenheer blogged about making your pages load faster by combining and compressing javascript and css files.
The key points from his testing are:
- Combining the set of JavaScript files into one
- Compressing that resulting file
- Caching the compressed file to disk (instead of compressing on the fly for each request)
Niels released his combine.php script that does the work for him.
There seems to be a natural tension between:
“One big compressed file to minimize connections and size”
and:
“Multiple files are good as they can be cached separately (a change to file A affects the entire combined file in the first case), so use the CNAME trick to allow multiple downloads at once”
Source: Ajaxian
Original Article: http://ajaxian.com/archives/maximizing-performance-with-compression-and-combination