Skip to content

How the web works

Trace a browser request through DNS, TCP, TLS and HTTP, estimate connection setup, and choose a transport for real-time updates.

25 min8 steps

By the end you can
  • Order DNS resolution, connection setup, TLS and an HTTPS request
  • Estimate cold-connection latency from round-trip time and server work
  • Explain how HTTP/2 and HTTP/3 differ when a packet is lost
  • Choose SSE, WebSockets or polling for an update requirement

A URL becomes a request

Cold HTTPS over TCP: DNS, then TCP, then TLS, then HTTP. A warm browser skips stages.

BrowserResolverServerDNS: shop.example?A record, TTL 300TCP SYN / SYN-ACK / ACKTLS handshake (certificate, keys)GET /orders/42200 + body
The path stays on the server. A #fragment never leaves the browser.

Order a fresh HTTPS request over TCP, assuming DNS is not cached.

  1. 1Send the HTTP request and receive the response
  2. 2Negotiate TLS and authenticate the server
  3. 3Resolve the host name to an IP address
  4. 4Establish a TCP connection

Answer this step to continue.