A closer look at HTTP

We talked about HTTP being a client-server protocol in which client retrieve Web pages from servers. A page may contain many objects -- text, images, scripts, flash movies, etc. and therefore require many requests. Three simple tools: break down a page request, showing the retrieval time of each object on the page. This can help us understand the HTTP protocol and be useful in tuning our Web pages for fast download.

Here we see the analysis of the retrieval of our class home page:

It involves only three requests

  1. retrieval of the page
  2. a call on Google Analytics retrieve a JavaScript program that records the access
  3. a call on Creative Commons to retrieve the small image at the bottom of the page
Note that the entire home page took around 430 milliseconds to load. The yellow bar shows the time to establish a connection to the server, the green shows the time to transmit the request, and the blue the time to download the object.

As we see here, the University home page involves more client-server requests. It downloads several images (.gif files) and several JavaScript programs (.js files), and takes longer to complete.

Two student home pages are also instructive. Each has pictures of students, but http://sws.csudh.edu/jlisella/assignments/classpage.htm combines them into a single image map and http://sws.csudh.edu/jquint22/assignments/ClassHomePage/ stores them as separate files.

We see the effect of this decision using Pingdom. One consists of 14 objects totaling 390.9 kbytes and takes 2.7 seconds to load, the other consists of 2 objects totaling 63.4 kbytes and takes 1.8 seconds. These differences might seem small, but multi-tasking users are often impatient and click away after a short delay. Furthermore, transport charges are significant on high-traffic Web sites.

For more in-depth information about analyzing and improving Web performance, see WebSiteOptimization.


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.