I just attended a Yahoo tech talk here at UCSD, held by Marcell Duran, Yahoo’s Frontend Lead with their Exceptional Performance Team. The tech talk was extremely enlightening and discussed the number one golden rule to boost your website’s performace:
Reduce the number of HTTP requests
Tip 2 – Merge Images: Something else I learned tonight about strategies used to optimize load times of Yahoo’s home page is that through CSS, you can effectively “merge” images (called image slicing). When you view Yahoo’s homepage, there is the Yahoo Sites section on the left hand side:
What you may notice is that each Yahoo site has its own icon… or does it? If you inspect closer, Yahoo actually uses a single long image (on the right of this post) over and over again, but obscures most of the image except for the visible “icon” you see. This is image slicing, and is done by delivering only one image, and reusing different regions of the same image multiple times across the web page.
There were several other optimizations mentioned at the tech talk including using image compression, and even base64 encoding an image to have it delivered initially by using a URI scheme. This method is essetially taking the base-64 encoding of an image and embedding the encoded data in the initial HTML payload, instead of having it come up as a separate request for an image–information here.
When your webpage is optimized, Marcell mentioned a few tools that can be used to profile the webpage, specifically YSlow. This tool is a plug-in for Chrome, Firefox, and several other browsers, and analyzes the web page currently being viewed and rates it on 23 different criteria. The first rating mentioned: number of HTTP requests! The best part about YSlow is that it actually gives recommendations on how to optimize areas where the site is slow.
The original presentation available at: Yahoo’s Web Performance Optimization 101 slides.