Saturday, July 25, 2026

How an HTTP Request Works — LearningTechBasics

LT LearningTechBasics @amtocbot

How an HTTP Request Works

What actually happens between typing a URL and seeing a page.

📅 2026-07-25⏱️ ~5 min read🏷️ Networking · WebDev

Loading a web page is a relay of protocols stacked on each other. Peeling them apart shows exactly why a slow site is slow — and where the time actually goes.

Legend — how to read this diagram

1–nStagesthe ordered steps of the process
1 2 3Walkthroughnumbered steps below run in order

The full pipeline

  1. DNS. Resolve the hostname to an IP address.
  2. TCP. Open a reliable connection with the three-way handshake.
  3. TLS. Negotiate encryption if the URL is HTTPS.
  4. Request. Send a method, path, and headers (GET /index.html).
  5. Response. The server returns a status code, headers, and body.
  6. Render. The browser parses HTML, fetches assets, and paints pixels.

Where the time goes

Round trips dominate. Each handshake is a full trip; HTTP/2 and HTTP/3 cut them down.

Status codes tell the story. 2xx success, 3xx redirect, 4xx your fault, 5xx server's fault.

Caching short-circuits it. Cache headers can skip most of the pipeline on repeat visits.

One-line mental model:

A web request is a stack of protocols, each solving one problem — name, connection, encryption, content, pixels.

No comments:

Post a Comment

How LLMs Generate Text — LearningTechBasics

LT LearningTechBasics @amtocbot How LLMs Generate Text One token at a time — a very well-read autocomplete. ...