O'Reilly logo

Web Performance Tuning, 2nd Edition by Patrick Killelea

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Performance Tips for HTML Authors

Here are some ways that HTML authors can help improve the download time for their files.

Make It Easy on the Server

When composing HTML, try to keep pathnames short, both in number of directories in the path and in the length of each directory name.

You can scale static content easily by partitioning the content across multiple servers and using HTML links to the different servers. To start out partitioning, consider using one server for images, another for HTML, another for applets, etc. Also keep in mind that your HTML can easily refer to other web sites for embedded content, which entirely removes the load from your servers but creates a dependency on the other servers and makes for thorny copyright issues. The Gamelan (http://www.gamelan.com) applet directory does not have applets itself, but simply links to the sites that do, with the authors’ knowledge. There has recently been some legal action against a site that was embedding news from other web sites in frames and selling its own advertising in a top frame.

Conversely, if you need to have a link on your page to a site known to be very slow, consider asking the site’s administrator for permission to copy the site to your web server.

Make your links explicitly refer to index.html files, or end directory references with “/”. As discussed in Chapter 15, the trailing “/” in a URL saves the server (and network) the additional overhead of a redirection. Also, explicitly referring to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required