What is the main improvement of HTTP/2 over HTTP/1.1?
Options
- Headers are always sent in plain text format
- Multiplexing many requests over one connection (Correct option)
- It removed TLS support from modern browsers
- It replaces TCP with a new transport protocol
Answer
Multiplexing many requests over one connection, removing head-of-line blocking at the HTTP layer
Why
HTTP/1.1 handles one request at a time per connection, so browsers opened about 6 connections per site and requests waited in line.
HTTP/2 sends many requests and responses at the same time over ONE connection (multiplexing) and compresses headers.
HTTP/3 runs over QUIC (on UDP), which also avoids TCP-level waiting when packets are lost.
Remember
HTTP/2 = many requests in parallel on one connection.