Browser InternalsIntermediate
What are the differences between HTTP/1, HTTP/1.1, and HTTP/2?
HTTP/1.0
- Each request requires a new TCP connection, closed immediately after completion (short-lived connections)
- Cannot reuse connections, resulting in poor performance
HTTP/1.1
- Persistent Connections (Keep-Alive): TCP connections are kept alive by default and can be reused
- Pipelining: Multiple requests can be sent at once, but responses must be returned in order (Head-of-Line Blocking problem)
- Added
Hostheader, supporting virtual hosting - Supports Chunked Transfer Encoding
HTTP/2
- Multiplexing: Multiple requests/responses handled in parallel over a single TCP connection, solving HOL Blocking
- Header Compression (HPACK): Compresses repeated headers to reduce data transfer
- Server Push: Server can proactively push resources to the client without waiting for a request
- Binary Framing: Data transmitted in binary format for higher efficiency
- Still based on TCP; TCP-level packet loss can still cause HOL Blocking
Summary Comparison
| Feature | HTTP/1.0 | HTTP/1.1 | HTTP/2 |
|---|---|---|---|
| Connection | New each time | Persistent | Persistent |
| Multiplexing | Not supported | Not supported (Pipelining) | Supported |
| Header Compression | None | None | HPACK |
| Server Push | None | None | Supported |
| Transfer Format | Text | Text | Binary |
✦ AI Mock Interview
Type your answer and get instant AI feedback
Sign in to use AI scoring
