HTTP/2 is the second major version of the Hypertext Transfer Protocol (HTTP), designed to make communication between web browsers and servers more efficient.
Introduced in 2015, HTTP/2 improves on HTTP/1.1 through multiplexing, binary framing, and header compression, allowing websites to load resources more efficiently without changing how HTTP requests and responses work.
How Does HTTP/2 Work?
HTTP/2 allows multiple requests and responses to share a single TCP connection. Instead of waiting for one response to finish before processing another, HTTP/2 divides messages into binary frames that can be transmitted across multiple concurrent streams.
Its key features include:
- Multiplexing: Transfers multiple requests and responses concurrently over one TCP connection, reducing the need for additional connections.
- Header Compression: Uses HPACK to reduce repetitive HTTP header data and transmission overhead.
- Binary Framing: Organizes HTTP messages into structured frames for more efficient communication.
- Stream Prioritization: Provides mechanisms for expressing request priorities, although the original HTTP/2 priority scheme has been deprecated.
HTTP/2 also introduced Server Push, but most major browsers have discontinued support for it. Alternatives such as resource preloading and HTTP 103 Early Hints are now commonly used.
What Are the Limitations of HTTP/2?
Although HTTP/2 improves request handling, it still relies on TCP, which can cause transport-layer head-of-line blocking.
When a TCP packet is lost, subsequent data must wait until the missing data is recovered, potentially delaying multiple HTTP/2 streams sharing the same connection.
HTTP/2 also typically requires a TCP handshake followed by TLS negotiation when establishing a new secure connection, adding latency on high-latency networks.
These limitations helped motivate the development of HTTP/3, which uses QUIC instead of TCP.
HTTP/2 vs. HTTP/3: What Changed?
The key difference is the underlying transport protocol.
HTTP/2 uses TCP, while HTTP/3 uses QUIC over UDP. QUIC enables independently managed streams, integrates TLS 1.3 into connection establishment, and supports connection migration.
These capabilities can improve responsiveness under packet loss or changing network conditions, although HTTP/3 is not necessarily faster in every environment.
HTTP/2 remains widely supported and continues to play an important role in web and CDN delivery, including as an alternative when HTTP/3 is unavailable.
Learn more about how QUIC and HTTP/3 work together and why modern HTTP protocols use different transport architectures.