Skip to the page

From URL to bytes · mid

HTTP/1.1 vs HTTP/2 vs HTTP/3 (QUIC)

HTTP/1.1 sends one request at a time per connection (browsers open about 6 per origin), HTTP/2 multiplexes many streams on one TCP connection with header compression but still suffers TCP head-of-line blocking, and HTTP/3 runs over QUIC on UDP so a lost packet only stalls its own stream and connections survive network changes.

The notes

What you must know

  • HTTP/1.1: text protocol, one in-flight request per connection, so browsers open up to 6 connections per origin. Old hacks: domain sharding, sprites, concatenation.
  • HTTP/2: binary framing, many concurrent streams on ONE connection, HPACK header compression, stream priorities. Server push existed but was removed from Chrome; use preload or 103 Early Hints instead.
  • HTTP/2 problem: TCP delivers bytes in order, so one lost packet blocks all streams (TCP head-of-line blocking). Bad on lossy mobile networks.
  • HTTP/3: QUIC over UDP with TLS 1.3 built in. Independent streams (no transport HOL blocking), 1-RTT setup (0-RTT on resumption), QPACK headers, and connection migration (Wi-Fi to 4G without a new handshake).
  • Discovery: the first visit uses HTTP/2 or 1.1; the server advertises HTTP/3 with the Alt-Svc header (or an HTTPS DNS record); browsers fall back if UDP is blocked.
  • For bundling: with HTTP/2+ many small files are cheap to request, so domain sharding hurts and concatenating everything is not needed; but hundreds of tiny chunks still cost (compression ratio, waterfalls).

The red pen

Common traps: mistake → fix

  • Mistake: "HTTP/2 removes head-of-line blocking"

    Fix: it removes HTTP-level HOL blocking, but TCP-level HOL blocking remains; HTTP/3 fixes that.

  • Mistake: "Use HTTP/2 server push to preload"

    Fix: push is removed from Chrome; use preload or 103 Early Hints.

  • Mistake: "Domain sharding still speeds things up"

    Fix: with HTTP/2+ it adds DNS/TLS cost and defeats multiplexing.

Easy to hard

Questions interviewers ask, easy to hard

  1. What changed in HTTP/2 compared with HTTP/1.1?
  2. What is head-of-line blocking at the HTTP level and at the TCP level?
  3. Why is HTTP/3 built on UDP? What does connection migration mean for a user on a train?
  4. How should HTTP/2 and HTTP/3 change the way we bundle and split JavaScript?

Practise

Practise with these questions

Explain it out loud

Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.

Practise by voice

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview