Sunday, July 15, 2007

A closer look at HTTP

We have talked about HTTP being a client-server protocol in which clients 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. These programs can help us understand the HTTP protocol and tune our Web pages for fast download.

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



It requires three requests:
  1. retrieval of the page
  2. a call on Google Analytics to record the access
  3. a call on Creative Commons to retrieve the small image at the bottom of the page
The entire page takes around 430 milliseconds to load. The yellow bar shows the time to establish a connection to the server, the green shows the time to request the object, and the blue the time to download it.

Note that these programs treat a script file as a single object without analyzing its content. Therefore, it does not give an accurate picture of a site like www.yahoo.com which uses an extensive Javascript.

No comments:

Post a Comment