Lesson 04: The Web and HTTP: Learning Outcome
Lesson 04: The Web and HTTP: Learning Outcome
Lesson 04: The Web and HTTP: Learning Outcome
4.0 Introduction
The internet was used primarily by researchers, academics, and university students to log into
remote hosts, to tranfer files from local hosts to remote hosts and vice versa. The World Wide
Web was introduced in the 1990s. The web is the intenet application that caught the general
publics general eye. The the internet is yet another electronic communication technology with
a major social impact. Email and the Web, two of its most popular applications have changed
how we live and work. We will cover the Web and its application layer protocol in this section.
Learning outcome:
HTTP is a protocol that allows Web browsers to talk to servers and exchange information. HTTP
provides a standard way of communicating between browsers and Web servers so any browser
can talk to any server, provided that they both conform to the HTTP specification. HTTP expects
the client to initiate a request and the server to respond.
The major difference between nonpersistent and persistent protocol is the number of TCP
connection(s) that is (are) required for transmitting the objects. Nonpersistent HTTP
connection requires that each object be delivered by an individually established TCP
connection.
1
Usually there is one RTT delay for the initial TCP connection.
The parallel TCP connections are used by nonpersistent HTPP to improve the performance,
i.e., to speed up the response time. Ideally, the shortest time that it can receive all objects is
two RTT (one for initial TCP, one for request and response) plus the transmission time of the
largest objects assuming that all the TCP connections can be established simultaneously.
Persistent HTTP connection without pipelining is that each client (browser) has to wait for
the previously requested object received before issuing a new request for another object.
Not counting the initial TCP establishment (one RTT time), each object needs at least one
RTT plus the transmission time of the object by the server; Persistent HTTP connection with
pipelining can allow a client to send out multiple (or all) requests, so servers can receive all
requests at once, and then sending responses (objects) one after another, hence the name
of pipelining. The shortest time is one initial RTT, another RTT for request and response, plus
the transmission time of all objects by the web server.
There are two types of HTTP messages. Request messages and response messages. Both these
formats are outlined briefly.
<startline>
<messageheaders>
<emptyline>
[<messagebody>]
[<messagetrailers>]
2
The fields in the HTTP message format
Blank Line
Message Body
Cookies are short pieces of data used by web servers to help identify web users. It allows
keeping track of the users that log into their servers and would recognize the user at the next
log in. A cookie consists of four parts.
Server send cookie to client in response message (set cookie 19830505) and the client
presents this cookie in later requests (cookie 19830505)then the server matches the presented
cookie with server stored information and grants authentication remembering user preferences
and previous choices.
3
4.4 HTTP Content
A cache is a sort of "buffer" or temporary memory: somewhere a machine stores in its memory
some documents, so that when a request is asking for an already cached document (document
stored in the cache), we would rather send this document instead of making a complete (and
long) request to the server. This is very interesting for much requested documents; this can
reduce the network traffic.
The trick consists of knowing if the document has been updated. The following diagram shows
the route followed by a resource when performing a request on it:
4
Actually, the client makes its request to a proxy server or any other cache system. Then this
proxy is going to guess if the requested document (which is also in its cache) has been updated.
To do so, it is going to use the directives it got when it asked for the document for the first time.
If it knows nothing about the document, it may perform a HEAD request. According to the reply,
the proxy is able to know if it should ask for a new version or simply send the version it has in its
cache. Fortunately this latter case is the most frequent one, and therefore we save time and
network load.
HTTP/1.0 also introduces another nice cache feature: a conditional GET request. This is
performed with a special directive.
A conditional GET request will ask the server to send the document if and only if this document
has changed since the specified date. For the client, it is just a matter of sending the date at
which it last got the document. If the resource has not changed, the server just sends a very
short "HTTP/1.0 304 Not Modified" and the client simply uses the version it already has.
Summary
You have completed the fourth lesson of Module 2303: Computer Networks. Now you will be
having an indepth knowledge in HTTP. You will be able to explain about HTTP message format, Non
persistent and Persistent connections, Cookies, HTTP Content, Web Caching, and the conditional GET.
The next lesson will be on Introduction to Transport Layer services. Before moving to that
lesson, check your success of learning with Quiz 4.