World Wide Web (WWW) Architecture
1. Concept and Origin of the Web
The World Wide Web (WWW) is a distributed, global hypermedia information system invented in 1989 by Sir Tim Berners-Lee at CERN.
While the "Internet" is the physical network infrastructure (cables, routers, packets, and IP addressing), the "Web" is an application service that runs on top of the Internet, enabling users to traverse interlinked multimedia documents via Hyperlinks.
2. Uniform Resource Identifiers (URI & URL)
A Uniform Resource Identifier (URI) is a standardized string that uniquely identifies an abstract or physical resource on the Internet. A Uniform Resource Locator (URL) is a specific URI that also specifies the access mechanism (protocol) and location:
Components of a URL:
- Protocol / Scheme: The application protocol used to retrieve the resource (
http,https,ftp). - Host: The domain name or IP address of the web server (
www.example.com). - Port: Optional port number (defaults to
80for HTTP,443for HTTPS). - Path: The hierarchical file directory or logical route on the server (
/products/items.html). - Query String: Parameter key-value pairs passed to the server (
?category=books&page=2). - Fragment: Anchor pointing to a specific internal heading within the HTML page (
#reviews).
3. Web Architecture: Static, Dynamic, and Active Pages
- Static Web Documents:
- Fixed files stored on the server file system.
- The server retrieves the file from disk and returns it byte-for-byte; every visitor sees the exact same content.
- Dynamic Web Documents (Server-Side):
- Generated dynamically by a server program (via CGI, PHP, ASP.NET, Node.js) in response to a user request.
- Content changes based on input parameters, session cookies, and database state (e.g., an Amazon shopping cart).
- Active Web Documents (Client-Side):
- The server returns an executable script (JavaScript) that runs inside the user's local browser runtime engine, manipulating the Document Object Model (DOM) and executing animations or single-page apps (SPAs) without page reloads.
4. Web Caching & Proxy Servers
To reduce transit latency and bandwidth consumption on backbone links, web architectures employ Proxy Caches:
Conditional GET & Validation:
When a client requests a previously cached object, it includes validation headers to verify if the file has changed:
If-Modified-Since: Client sends the timestamp of its cached copy.ETag(Entity Tag): A cryptographic hash of the file content.- If the file has not changed, the server returns
304 Not Modifiedwith zero payload body, saving massive bandwidth!
Frequently Asked Questions
QDistinguish between the Internet and the World Wide Web.
The Internet is the global physical and logical networking infrastructure connecting computers (OSI Layers 1–4). The World Wide Web is an application-layer hypermedia service (HTTP/HTML) running on top of the Internet.
QName and describe the three core components that make the Web work.
URL (identifies and locates web resources), HTML (formats and structures hypermedia content), and HTTP (transports web pages between clients and servers).
QWhat is the HTTP 304 Not Modified status code?
It is returned by a web server in response to a conditional GET request, informing the client that its cached copy of the resource is still fresh and can be displayed without re-downloading the file over the network.
QDifferentiate static, dynamic and active web documents.
Static documents are fixed files returned as-is. Dynamic documents are generated by a server-side program per request. Active documents ship a script (e.g., JavaScript) that runs inside the client's browser.