- 2072 Magh · 2+8 marks
WWW; HTTP header and connection types
Short answer
The World Wide Web is a distributed hypertext system using URLs and HTTP. HTTP headers are Name:value metadata lines. Connection types are non-persistent (Connection: close, one object per TCP) and persistent (Connection: keep-alive, multiple objects on one TCP, with optional pipelining).
What is WWW? Define HTTP header with its connection type.
What is WWW?
The World Wide Web (WWW) is a distributed information system of linked hypertext documents and other resources, each identified by a URL and accessed over the Internet using HTTP. Documents are written in HTML, displayed by a browser (client) and stored on web servers. It was proposed by Tim Berners-Lee at CERN in 1989. The web is one service on the Internet; e-mail and FTP are others.
HTTP header
HTTP messages consist of a start line, header lines, a blank line, and an optional body. Headers are Name: value pairs giving extra information about the message, client, server or body.
Request message
GET /index.html HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0
Accept: text/html
Accept-Language: en
Connection: keep-alive
If-Modified-Since: Wed, 9 Sep 2020 09:23:24
Response message
HTTP/1.1 200 OK
Date: Thu, 8 Oct 2026 10:00:00 GMT
Server: Apache/2.4
Last-Modified: Wed, 9 Sep 2020 09:23:24
Content-Length: 6821
Content-Type: text/html
Connection: keep-alive
Common headers: Host (required in HTTP/1.1, supports virtual hosting), User-Agent, Accept, Cookie / Set-Cookie, Content-Type, Content-Length, Cache-Control, Expires, Last-Modified, Location.
Connection types (the Connection header)
- Non-persistent connection (HTTP/1.0). Each object needs a new TCP connection, which the server closes after sending one object (
Connection: close). Costs 2 RTT per object plus server overhead. - Persistent connection (HTTP/1.1 default,
Connection: keep-alive). The connection stays open for further requests to the same server.- Without pipelining: next request after the previous response arrives (about 1 RTT per object).
- With pipelining: the client sends many requests without waiting for replies (about 1 RTT total for all objects).
The connection stays open until a timeout, or until either side sends Connection: close.
✓ Answer checked by Claude Opus 5.5 (high effort)