Fetching A Web Page

Before you can read a book, you need to pick it up. Similarly, before you can read a web page, you have to fetch it from the Internet. So, how do we go about fetching a web page to read? Well, guess what? It’s just like the real world.

Suppose you want to read The Hobbit. You might do something like this:

  1. Look up the address of your local library
  2. Walk to the library
  3. Find the right shelf
  4. Pick up The Hobbit

Now, suppose you want to read a web page, for example: http://www.gondolin.org.uk/index.html.

  1. Look up the address of the server, www.gondolin.org.uk (see How Does The DNS Work? for details on how this happens)
  2. Connect to the server
  3. Look in the appropriate directory (in this case it’s at the top level, “/“)
  4. Copy the page to a file to your computer (index.html).

Copying web pages to your computer usually uses a standard known as the HyperText Transfer Protocol, or HTTP. This is why most web addresses begin with “http://” – that tells your computer how it should talk to the server (a bit like knowing what language to speak when you talk to the librarian in the library example.)

  Next