Why HTTP/2 Matters: Key Features and Performance Boosts Explained
HTTP/2, the first major update to HTTP since 1.1, introduces binary framing, multiplexing, server push, and header compression, dramatically improving web performance by reducing latency, consolidating connections, and optimizing resource delivery, as detailed in this comprehensive overview.
1. What is HTTP/2
HTTP/2 is the first major update to the HTTP protocol since HTTP/1.1, based on the SPDY protocol and developed by the IETF's Hypertext Transfer Protocol Bis (httpbis) working group. The specification was submitted for discussion in December 2014, approved on February 17, 2015, and published as RFC 7540 in May 2015.
2. New Features of HTTP/2
1) Binary Framing
HTTP/2 transmits data in a binary format instead of the textual format used by HTTP/1.x, making protocol parsing more efficient. While HTTP/1 messages consist of a start line, headers, and an optional body separated by text line breaks, HTTP/2 splits requests and responses into smaller frames encoded in binary.
All communication under the same domain name occurs over a single connection, which can carry any number of bidirectional streams. Each stream is sent as a message composed of one or more frames, and frames may be transmitted out of order, being reassembled based on stream identifiers in the frame headers.
2) Multiplexing
Multiplexing replaces the sequential and blocking mechanisms of HTTP/1.x. All requests are completed concurrently over one TCP connection. In HTTP/1.x, achieving concurrency required multiple TCP connections, and browsers limited each domain to 6‑8 simultaneous connections.
With binary framing, HTTP/2 no longer relies on multiple TCP connections to achieve parallel streams. In HTTP/2:
All communication under the same domain uses a single connection.
A single connection can carry an unlimited number of bidirectional streams.
Streams are sent as messages composed of frames; frames can be out of order and are reassembled using stream identifiers.
This results in significant performance gains:
The single connection per domain eliminates latency and memory overhead caused by multiple TCP connections.
Requests and responses can interleave on the same connection without interfering with each other.
Each request can carry a 31‑bit priority value (0 = highest priority); the client and server can use these priorities to schedule streams optimally.
3) Server Push
HTTP/2 enables the server to send multiple responses for a single client request. In addition to the response for the original request, the server can proactively push additional resources—such as JavaScript and CSS files—without the client explicitly requesting each one.
4) Header Compression
Every HTTP transaction includes a set of headers describing the resource and its attributes. In HTTP/1.x these headers are sent as plain text, adding 500‑800 bytes of overhead per request, and potentially thousands of bytes when cookies are involved. HTTP/2 reduces this overhead by using the HPACK compression format to compress request and response header metadata.
3. Conclusion
HTTP/2 reduces latency by supporting multiplexed requests and responses, minimizes protocol overhead through header compression, and adds support for request prioritization and server‑side push, collectively delivering a more efficient web experience.
MaoDou Frontend Team
Open-source, innovative, collaborative, win‑win – sharing frontend tech and shaping its future.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.