Web fundamentals

HTTP request lifecycle

A browser turns a URL into a rendered page through name resolution, connection setup, a request–response exchange, and rendering.

Mental model

Think of the browser as a client sending a precisely addressed order. DNS finds the destination, the network establishes a route, the server prepares a response, and the browser assembles the result.

How it works

Open the editable draw.io source.

  1. Resolve: DNS translates the hostname into an IP address.
  2. Connect: the browser establishes a transport connection; HTTPS also negotiates TLS.
  3. Request: the browser sends an HTTP method, path, headers, and sometimes a body.
  4. Respond: the server returns a status, headers, and content.
  5. Render: the browser parses the response and may request CSS, JavaScript, fonts, and images.
Key distinction: HTTP describes the messages; DNS, TCP or QUIC, and TLS provide supporting layers.

Trade offs and common mistakes

Sources and further reading