Tuesday, February 21

Sequential or parallel loading of web pages

When a web page is downloaded, lots of text and images are downloaded in parallel. This means pages are slower to respond than they need to be. You can work out which parts of the page your users are most interested in, download these first, then download the remainder. Typically, images are less important than the text on your page and some images are more important than others. One way of doing this is described here.


http://www.cryer.co.uk/resources/javascript/script3.htm


This will result in the important part of the page being downloaded quicker (see the graphs below). Users can read what interests them in less time.





As I was reminded last night at an excellent talk by Ted Neward at the London .NET users group, bandwidth isn't infinite. Many users have dial-up connections. Over a dial-up connection, a 20K image takes about 5 seconds to download.


However, not everyone has JavaScript (but about 98% of readers of this blog do). Also, the JavaScript itself takes a few bytes of bandwidth, so this may not be the best solution for very small images, and overall load time is slightly slower.

No comments: