1. Technology
Send to a Friend via Email

Speeding Up Your Web Page

Download Times are Always Important

By

How many times have you gone to a Web page and given up before it finishes the download? If you are like most Web readers, you have hit the stop button many many times. Why then, do you expect your readers to wait for your pages to load?

When you try to improve the speed of your Web page, you must consider several things:

  • Images
    Optimizing your images is the best way to improve the download speed of your Web pages. A good rule of thumb is to strive for no one image being larger than 10 Kb. This is especially hard with animations, but if you can do it, you'll have some great fast images.

    Also, after you optimize your images, you should call them in your HTML with the height and width specified in the image tag. This will allow the browser to continue rendering the Web page while the image downloads in the background.

  • HTML
    Once you have your images down to a reasonable size, try streamlining your HTML. You will find sites out on the Internet that advocate removing all extraneous tags, to the point of removing the final </body> and </html>. I do not think this is a good idea, but you can remove all the unnecessary attributes created by some editors, and use the defaults of tags as much as possible. For example, if you create a table and you want the cellpadding and cellspacing to be 2, then leave out those attributes. That is the default for a table.

  • Page size
    With small images and clean HTML, you can still end up with a page that takes forever to download because there is so much information. If you are striving for a speedy download, limit your page total size (including images) to about 30 Kb. You'll still be on the high side if you're at 30 Kb, but 50% of the pages on the Web are 32 Kb or less, so you'll be in good company. (From the Seventh Georgia Tech GVU WWW survey as quoted in "How Much is Too Much")

  • Tables
    Nested tables are a common cause of slow pages. They are so tempting to use as they improve the layout enormously, but they take a long time for the browser to render. It's not that the page didn't download, but with multiple tables in tables, the browser has to work harder to display the page. It cannot display any part of the page in the tables until it has figured out how to render all the tables that are nested.

  • Advertisements
    Many advertisements are served from a different Web server than the Web page. If that server is down or slow, it will impact the loading of any page they are called from. The same is true for counters and other external CGIs and images that are not on the same Web server.

  • Web Server
    If you've optimized your graphics and HTML and kept the page size to a minimum and it still takes forever to load, check out your Web server. Is it getting more hits than it can handle? It might be time to upgrade the machine or the connection between it and the world, if it isn't showing the bandwidth you want.

Previous Features

©2014 About.com. All rights reserved.