Small is Beautiful

File Size

One problem with the Web is that information must be retrieved from a remote location before it can be displayed on the user's machine. Even though this information may fly around the planet at a truly amazing speed, it still isn't fast enough. One of the most basic principles of design for the Web today is: keep your files as small as possible. A good rule of thumb is to keep your pages under 35 Kb.

How to Calculate

You can calculate the size of any given Web page by adding the size of the HTML file and all of the inline image files. For example, this page is weighs in at a bloated 77.5 Kb. The text file is only about 2.5 Kb, but the background image is 48 Kb and the screen shot below is 27 Kb.

Image Caching

There is one more wrinkle that complicates matters. Most browsers will store images in a temporary cache on the user's hard drive, which means they only have to be downloaded once. If that same image is used in another page, the browser will use the cached version and the page will load more quickly.

So even though the background image of this page is a bit large, I might justify it if I used it as the background for all my pages.

Layout

Small is also beautiful in terms of page layout. Many people use monitors that are 640 pixels wide by 480 pixels tall. A Web browser takes up some of this space, leaving only a 600 by 300 pixel window for many users.

As an example, consider the sample home page we examined earlier. It can't quite fit into such a box.

browser screenshot

The best solution is to design a page that will look good no matter what the resolution of the output device, but this is not always possible.

How Much on One Page?

File size considerations aside, how much content should be on one page? The content itself should be your guide.

Some documents lend themselves to lengthy page treatments. For example, if I were publishing a chapter from a novel I had written, it would make sense to put the chapter on one long page, even if the file size was extremely large.

As a general rule, however, you should make sure that the most important content of your Web pages is visible without scrolling, even for users with small screens. Newspaper publishers don't hide their top headlines "below the fold" and neither should you.


| Planning Your Website | Tutorials |