HTTP/1.1, HTTP/2 and HTTP/3
What changed between HTTP versions and why it makes pages faster.
On the roadmap:Beginner · step 2: How the web works
Lesson 4 of 23 · 7 min read · quiz · exercise
HTTP/1.1
- One request at a time per connection (responses come back in order).
- To fetch many resources, browsers open about six connections per host.
- Each request repeats large text headers.
- A slow response blocks those behind it: head-of-line blocking.
- Keep-alive lets a connection be reused, saving handshakes.
HTTP/2
- Multiplexing: many requests and responses share one connection at the same time, interleaved as separate streams.
- Header compression removes the repeated cost.
- Binary framing is more efficient to parse than text.
- Server push existed but is rarely used and is being phased out.
- Still runs over TCP, so if one packet is lost, TCP holds back all streams until it is resent (head-of-line blocking at the transport layer).
Before: HTTP/1.1: many connections
After: HTTP/2: one shared connection
What changed
- One connection carries many requests at once
- Headers are compressed
- Old tricks like domain sharding stop helping
HTTP/3
- Runs over QUIC, built on UDP, with encryption (TLS 1.3) included.
- Independent streams: a lost packet only delays its own stream.
- Faster connection setup: fewer round trips, and resuming a previous connection can send data immediately.
- Connection migration: a phone moving from Wi-Fi to mobile data can keep the connection, because it is identified by an ID, not an IP address.
Figure SDA-CORE-04-1 · HTTP/3 · © forcsguy.com
Figure SDA-CORE-04-2 · What one lost packet does in each version · © forcsguy.com
What this means for you
- Use HTTPS everywhere. Browsers only use HTTP/2 and 3 over TLS.
- Serve through a CDN or server that supports HTTP/2 and 3; clients negotiate automatically and fall back if needed.
- Do not over-optimise for HTTP/1.1 any more. Keep requests cacheable and compressed.
Check your understanding
Question 1 of 3
0 correct so far
What is head-of-line blocking in HTTP/1.1?
Topics covered in this lesson
Practise it: Fewer round trips for static content
Everything below is already set up for this lesson: change the design, run the traffic, and see whether you meet the goal.
- 1The task
- 2Build and test
Many small, cacheable responses are slowing the site: 6,000 requests per second of static reads.
Goal: Under 1% errors, slowest 5% under 120 ms.
What serves the same static bytes to everyone, near them?
Try it yourself
A page loads 60 small assets. Compare how HTTP/1.1 and HTTP/2 handle it, and say which old optimisation tricks become unnecessary.
Click what a strong design here would need:
More in Building blocks
© 2026 forcsguy.com. Original lesson text and diagrams. Books and sites linked above belong to their authors.