CanadaOne Twitter CanadaOne Linkedin CanadaOne Facebook CanadaONe RSS

Ask an Expert

Factors That Determine a Web Page's Loading Time

Expert: Julie King

Balraj asked:

What factors determine a web page's loading time other than image size, internet bandwidth, page size and do the comments within the page also contribute to the download time?

Julie King answered:

A web page's load time depends on many factors that can be separated into two main components: the actual page sizes and bandwidth/routing pathways.

What's in a page: bits and bytes
A web page is often comprised of many components, from text and images to multimedia files. Visiting a web page is actually a lot like having a take-out restaurant deliver food to your door. While we talk about "visiting" sites, our web browsers are actually sending out a request - or "an order" - for a specific page that is identified by the website address (URL or Universal Resource Locator). Once that request is received by the remote computer, the data associated with the request - which includes things like images, HTML code, database-driven information - is passed through the Internet until it reaches your Internet Service Provider (ISP). At this point your ISP passes the data on to your computer.

Because the web page is actually being delivered to your computer, the "weight" of everything on the page has a major impact on how quickly or slowly the page will load on the end users" screens.

In computer jargon the weight or size is measured in bits and bytes. Everything that needs to be transferred, including the text used to insert comments into HTML code, has an impact on the overall download time. However, since text takes up very little space it is unlikely that a handful of comments should be discarded due to concerns about download time.

In most cases, proper image optimization can significantly reduce the download time of a web page. It is important to use jpeg and gif images properly, with gifs being best suited for large blocks of colour and text, while jpegs are perfect for photos and images that use thousands of colours. The PNG format is also becoming more common. The advantages of the PNG format are based on the way a PNG image is progressively displayed on screen, supports alpha channels, and is lossless while supporting up to true 48-bit colour. A good primer on the basics of the PNG format can be found at:

Another factor to be considered is the number of images on the pages. Many designers will break up an image into a number of smaller blocks, but if you experiment with the jpeg format you will see that this can significantly increase the overall file size. As well, having tens or even hundreds of tiny images that are only a few bytes each does not necessarily guarantee a faster download time, as the seek time of the hard drive must also be taken into account, as well as the fact that each image is requested individually from a remote computer (web server).

Finally, caching has a major impact on the page download time. If you build a site and reload the same images from page to page, the images that are reused will not need to be downloaded for each new page that they appear on. (This is true unless you force the page to reload each time it is opened.)

What happens is that your web browser saves copies of these images locally in a cache folder. By keeping the most recently loaded images on hand, the web browser eliminates the need to repeatedly download an image that appears many times within one site. Major ISPs will also cache commonly requested web pages and their associated images to reduce the load on their servers and prevent thousands of users from repeatedly downloading the same images.

QuickTip: If your web page uses complex tables that are loaded with data, the size of your web page can get quite big if you are wrapping a long font tag around each data cell. To reduce the amount of text markup, cascading style sheets (CSS) are very useful in this situation. However, not all browsers - WebTV in particular - support CSS, so this could be a problem if a large part of your audience are WebTV users.

Best Routes
While comparing web page download times to ordering take-out, consider the impact of traffic and the delivery route. If the roads are congested with traffic, then it will take longer for your dinner to arrive than if they are clear. At the same time, you can get from one place to another faster if you use a major road rather than taking a smaller road that is run down and full of potholes. Finally, all else being equal, the road that is the most direct will be the fastest route.

These three scenarios are key factors that affect the download time of a web page.

First, during times of heavy use the Internet will slow down overall, as computers that move information work hard to deliver data to millions of users. Many ISPs will have regular slowdowns during popular usage times.

Secondly, if you connect to the Internet through a host that offers a better roadway, then the data that you request will reach you faster. For example, when we made a switch from one Canadian ISP to another several years ago, using the exact same equipment and with the same type of account, the download time was almost cut in half.

Finally, some web hosts and ISPs are better at selecting the least congested and most direct routes between two computers, and are therefore able to get information to the end user more quickly than their competitors. The tool you can use to measure the efficiency of this, which is known as routing, is called traceroute. This is available on Windows in the DOS window. Also, you can use another tool called PING in the DOS window to measure exactly how long it takes for a small package of data to go back and forth between your computer and another computer.

It's the sum total of the PING time, the number and size of the files requested (images, text, etc.), and the bandwidth (modem/connection speed) that will determine how long it takes for a web page to load on your computer.

About the author

Julie King is the co-founder and managing editor of CanadaOne, Canada's first small business portal.

Click here to go back to Ask-an-Expert index page.