Advanced Lecture Notes: Foundations of Web
Technologies
Compiled from Chapter 1 Lecture Slides
1. Web and HTTP Fundamentals
A web page consists of multiple objects, which can be HTML files, images, scripts, or other media.
These may be hosted on different servers and referenced via URLs. HTTP (Hypertext Transfer
Protocol) operates in a client-server model: - Client: Typically a web browser that requests and
displays web content. - Server: Responds to requests by sending web resources over HTTP. HTTP
uses TCP (port 80 for HTTP, port 443 for HTTPS) to ensure reliable data transmission. It is a
stateless protocol: servers do not retain client state across requests.
2. HTTP Connection Types
Non-Persistent HTTP: - One TCP connection per object, requiring 2 RTTs (Round Trip Times) per
object. - Loading a page with multiple resources requires multiple TCP handshakes. Persistent
HTTP (HTTP/1.1): - Maintains a single TCP connection for multiple requests. - Enables pipelining:
sending multiple requests without waiting for responses, reducing overall latency.
3. HTTP Request and Response Structure
HTTP Request: - Request line: method (GET, POST, PUT, HEAD), URL, version. - Headers:
metadata (Host, User-Agent, Accept, etc.). - Optional body: data sent with POST/PUT. HTTP
Response: - Status line: protocol version, status code (e.g., 200 OK, 404 Not Found), reason
phrase. - Headers: content type, length, caching directives. - Body: actual resource (HTML, JSON,
binary file, etc.).
4. Common HTTP Methods
- GET: Retrieve a resource. Data can be appended as query parameters. - POST: Send data in the
request body (e.g., form submission). - PUT: Upload/replace a resource at a specified URI. - HEAD:
Retrieve only response headers without the body.
5. Maintaining State with Cookies
HTTP is stateless; cookies provide stateful behavior. Components: 1. Server sends Set-Cookie
header in HTTP response. 2. Browser stores cookie locally. 3. Browser sends cookie in Cookie
header in subsequent requests. 4. Server maps cookie to user session in its database. Uses:
authentication, shopping carts, personalization, tracking. Privacy issues: third-party cookies allow
cross-site tracking.
6. Web Caching and Proxy Servers
A web cache stores frequently accessed objects to reduce response times and bandwidth usage. If
object exists in cache: returned immediately to the client. If absent: fetched from the origin server,
cached, then returned. Benefits: - Faster response time (cache is closer to client). - Reduced load
on origin servers and network links.
7. HTTP/2 and HTTP/3
HTTP/2: - Multiplexing: splits objects into frames, interleaves transmission to reduce head-of-line
blocking. - Server push: proactively sends resources before requested. HTTP/3: - Uses QUIC over
UDP, providing built-in encryption and lower latency. - Eliminates TCP's head-of-line blocking.
8. Content Distribution Networks
CDNs replicate content across geographically distributed servers to improve scalability and reduce
latency. Deployment Models: - Deep: servers embedded within ISPs (Akamai model). - Regional
clusters: large server groups near access networks. Advantages: reduced congestion, faster load
times, improved availability.
End of Advanced Notes
These handouts aim to provide advanced students with an in-depth understanding of HTTP
architecture, performance, and modern web delivery mechanisms.