HTTP/1.1 vs HTTP/2 vs HTTP/3: what actually changed and why it matters
HTTP is the protocol browsers use to talk to servers. The meaning of requests (GET, POST, headers, status codes) has stayed largely the same; what changed is how the bytes move across the network.
HTTP/1.1
- Text-based and simple to read
- One request at a time per connection; a slow response blocks the ones behind it (head-of-line blocking)
- Browsers worked around this by opening several connections per site, and developers used tricks like bundling files and image sprites
HTTP/2
- Binary framing instead of plain text
- Multiplexing: many requests and responses share one connection at the same time
- Header compression reduces repeated overhead
- Still runs over TCP, so a single lost packet can stall everything on that connection
HTTP/3
- Runs over QUIC, a transport built on UDP
- Each stream is independent, so packet loss on one doesn't block the others
- Faster connection setup, since transport and encryption handshakes are combined
- Handles network changes better, like switching from Wi-Fi to mobile data
What it means for developers:
- Many HTTP/1.1-era optimizations (heavy bundling, domain sharding) matter less now
- Most of the benefit comes automatically from your server, CDN or hosting provider supporting the newer versions
- Gains are largest on unreliable or high-latency networks, like mobile connections
Have you measured a real difference after enabling HTTP/2 or HTTP/3? Do you still bundle aggressively, or have you moved to shipping more, smaller files?
Comments · 4
Good summary for beginners: the key idea is that HTTP/3 fixes the problem HTTP/2 couldn't, since moving off TCP means one lost packet no longer stalls every stream. Most developers get it by enabling it on their CDN or server, not by changing code.
Why did HTTP/3 move from TCP to QUIC over UDP? What problem was it solving that HTTP/2 didn't?
TCP forces all streams to wait if one packet is lost, even in HTTP/2. QUIC runs over UDP and handles each stream separately, so one lost packet doesn't stall the others. It also speeds up connection setup.
Most CDNs and modern servers already serve HTTP/2 and 3, so you often get them with a config toggle.