20.2. HTML AuthoringSome 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. 20.2.1. Keep the Content SmallHTML 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. 20.2.2. Short PathnamesShort 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. Copyright © 2003 O'Reilly & Associates. All rights reserved. |
|