HTML Authoring

Some HTML authors might think that the speed that their pages download is out of their control. That’s not true at all: HTML authors are the ones who control what data, and how much of it, is actually sent.

Keep the Content Small

HTML authors sometimes put such heavy content on each page that performance suffers. You don’t need style sheets, redirections, frames, Flash, JavaScript, or Java. Each one will hurt performance and portability, so keep it simple when you can. Most users are happy to load very simple pages as long as they can get them right this instant.

The basic performance principle is therefore to send fewer bits and make fewer requests. Try to think of size in terms of download time rather than absolute bits because the time a human being has to wait is the true measure of web page failure. If most of your users are on 56K modems, make a rule that no web page can be larger than 10 seconds. As a rule of thumb, remember that ten seconds on a 56K modem happens to correspond to about 56KB in size.

Short Pathnames

Short URL pathnames not only speed up downloads, but also save log file space on your servers. Using short pathnames may make it difficult to navigate your way around the directory tree, but that might be a reasonable trade-off for the improvement in speed.

Get Webmaster in a Nutshell, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.