Appendix C: Browser Compatibility
index | previous | next

Image Bloat

Some things, like image size, need to be taken care of at the source: the image-editing program.

Use the right image format. JPEG is better for photographs, and GIF is better for graphics.

Use a selective color palette. Depending on the number of colors in your image, you may get a smaller file size by using an Adaptive, Exact, or Custom palette. Experiment.

Optimize your JPEGs. (There's usually a checkbox for this somewhere.) Optimization makes the JPEG compress like areas of the image into more logical data chunks. If you don't need the image to have perfect resolution, use the highest possible compression.

For multicolored GIFs, try interlacing. Interlaced GIFs load in chunks and generally load faster than non-interlaced GIFs. Don't bother interlacing two-color GIFs or GIFs that are only 5K or less.

 

Faster! Faster!

(continued from previous page)

If your pages are slow, help is in sight. Most bloat comes from frames, images, Java applets, and plug-ins.

Java and Plug-in Tips

  • Don't stick gigantic applets or plug-ins on the front page. My biggest Web peeve is unnecessary widgets that slow down my whole system, sucking up any spare memory, while they load a…flashing sign!

  • Do use an alt image that will fill in the space while the applet or plug-in loads. (See the relevant section in Chapter 7.)

Frames Tips

  • If your site uses frames, offer a non-frames version. Some people hate frames, for very little reason. Other people hate frames because so many frames-based sites are lousy. (Chapter 13 describes how to make a no-frames version that will show up in older browsers; you can also make a separate no-frames page that people can choose to look at.)

  • More than four frames is usually too much. Each frame is a separate document, plus the frameset page, so four frames would equal five documents. Browsers have a limited number of simultaneous socket connections, generally four. What that means is that they can download only four objects simultaneously. You do the math.