There's one more important technique that's key to boosting the perceived speed of your site. Those images that repeat throughout your site common logos, headers, or navigation bars don't need to be downloaded more than once. By default, Netscape and Internet Explorer set aside a memory cache to store recently-used images in RAM and on the hard disk. If a browser recognizes the same filename, it'll pull the image straight from the cache instead of downloading it. This provides a massive performance boost that a lot of automated timing programs don't acknowledge. Just pull out a stopwatch and see for yourself.
Since the client-side cache is such a useful ally, you should design pages with the browser cache in mind. For instance, if your site uses a number of different header graphics that vary only slightly (like a standard logo with various department names underneath it), try breaking up the image so that the unchanged portion (the standard logo) is stored in the cache and always loads immediately. Though you'll still need to load a new graphic on each page (in this case, a department name), the image is smaller and therefore downloads faster.
Browser caches are conceptually similar, but not the same thing as Network (or "Proxy") cache, which we cover later in this Tutorial.
next page»