HTTP/1.1, HTTP/2 and HTTP/3: what changed and which old tricks still help
Why HTTP/1.1 needed domain sharding and sprites, how HTTP/2 multiplexes streams on one connection with HPACK, why server push was removed, and how HTTP/3 over QUIC fixes head-of-line blocking.
Comes up in: Web fundamentals, Recruiter screen, Frontend system design
Learn#
Farhan joins a team whose build splits images across img1.cdn and img2.cdn, combines icons into one sprite, and inlines everything it can. The site is on HTTP/2. Which of these tricks still help, and which now hurt?
HTTP/1.1 sends one request at a time per connection, and browsers allow about six connections per origin. So teams invented hacks: domain sharding (more origins, more connections), sprites and concatenation (fewer files).
HTTP/2 uses multiplexing: many requests share one connection as interleaved streams. HPACK compresses repeated headers such as cookies. Server push was meant to send files before they were asked for, but it rarely helped, and Chrome removed it in version 106.
HTTP/3 runs on QUIC, a transport over UDP with TLS 1.3 built in. It removes TCP’s head-of-line blocking, where one lost packet stalls everything behind it, and a connection can survive a switch from Wi-Fi to mobile data.
Network
- conn 1–6: files 1–6
- then 7–12 …
- 5 round trips of requests
HTTP/1.1: each connection carries one request at a time. Browsers open about 6 per origin, so 30 files load in 5 waves.
Read the steps as text
- HTTP/1.1: each connection carries one request at a time. Browsers open about 6 per origin, so 30 files load in 5 waves.
- HTTP/2: one connection, many streams. All 30 requests go out at once, interleaved as frames.
- But HTTP/2 runs on TCP. One lost packet stalls every stream until it is resent: head-of-line blocking.
- HTTP/3 runs on QUIC over UDP. A lost packet stalls only the stream it belonged to.
Predict#
Predict first
Your site is on HTTP/2. Is domain sharding (img1.cdn, img2.cdn) still helpful?
HTTP/2 already sends everything in parallel on one connection. Extra origins add setup round trips and stop the browser from prioritizing across all files. Sharding was a fix for a limit that no longer exists.
Interview angle#
Say it like this — about 30 seconds
“HTTP/1.1 sends one request per connection at a time, with about six connections per origin, which led to sharding, sprites and bundling. HTTP/2 multiplexes many streams over one TCP connection, compresses headers with HPACK, and supports prioritization; server push existed but was removed from Chrome. HTTP/3 runs over QUIC on UDP, with TLS built in, fewer handshake round trips, no TCP head-of-line blocking, and connection migration. Bundling still helps for compression and module waterfalls, but in moderate chunks.”
Follow-up What is the difference between HTTP/1.1, HTTP/2 and HTTP/3?
Follow-up Is bundling still useful with HTTP/2?
Follow-up Why is HTTP/3 good on mobile networks?
Practice#
Guided
Model connections and request waves for each protocol, and decide where sharding still helps.
Done when
- HTTP/1.1 opens 6 connections per origin; HTTP/2 and HTTP/3 one.
- HTTP/1.1 needs ceil(n / connections) waves; HTTP/2 and HTTP/3 one.
- Sharding is worth it only for HTTP/1.1.
Remember#
Try to answer each card before you open it. Then add them to your reviews.
What is HTTP/2 multiplexing?
Many requests sent in parallel as streams over one connection.
What transport does HTTP/3 use?
QUIC, over UDP, with TLS 1.3 built in.
Which HTTP/1.1 hack hurts on HTTP/2?
Domain sharding.
What replaced HTTP/2 server push?
103 Early Hints and preload.
Go deeper
Four layers. Stop at the one your interview needs; each ends with a quick check.
The core ideaEvery round
Check yourself: How many connections per origin do browsers allow over HTTP/1.1?
About six.
How it works underneathSenior rounds
HTTP/2 splits messages into binary frames tagged by stream ID, so they can interleave. HPACK keeps a table of headers already sent, so repeated cookies and user agents cost a few bytes Source: RFC 9113: HTTP/2.
Check yourself: What does HPACK compress?
HTTP headers, using a shared table of previously sent headers.
Edge cases and trapsWhere people slip
Browsers learn a server speaks HTTP/3 from the Alt-Svc header or DNS HTTPS records, and fall back to HTTP/2 when UDP is blocked. QUIC encrypts more of the transport, so middleboxes see less Source: RFC 9114: HTTP/3.
Check yourself: Why can HTTP/3 fail and fall back on some networks?
Some firewalls block or throttle UDP, so browsers fall back to HTTP/2 over TCP.
In productionStaff-level answers
Use 103 Early Hints and preload instead of push (WEB.01.05). Turn on the Protocol column in DevTools’ Network panel. Most CDNs, including Cloudflare, serve HTTP/3 automatically.
Check yourself: How do you check which protocol a request used?
The Protocol column in the DevTools Network panel (h2, h3).
Finished the five steps? Mark it, and its cards join your reviews.
Last checked 2026-11-01. Spot a mistake? Use “Report an error” below — fixes are listed on the corrections page.
Interview questions this answers
- Is bundling still useful with HTTP/2?
- What is the difference between HTTP/1.1, HTTP/2 and HTTP/3?