HTTP/2 is the second major version of the Hypertext Transfer Protocol, standardised in 2015 (RFC 7540). It was designed to address the performance limitations of HTTP/1.1 and significantly speeds up web page loading. HTTP/2 is now supported by all major browsers and most web servers.
Key Improvements Over HTTP/1.1
- Multiplexing — Multiple requests and responses can travel over a single TCP connection simultaneously. HTTP/1.1 required multiple connections or serialised requests, causing head-of-line blocking.
- Binary framing — HTTP/2 uses a binary protocol instead of plain text, which is more efficient to parse.
- Header compression (HPACK) — Compresses HTTP headers, reducing overhead on repeated requests.
- Server push — Servers can proactively send resources (CSS, JS) before the browser requests them.
- Stream prioritisation — Clients can assign priorities to requests so critical resources load first.
HTTP/2 Requirements
- HTTPS is required in practice — all major browsers only support HTTP/2 over TLS.
- A modern web server: Nginx 1.9.5+, Apache 2.4.17+, IIS 10+ (Windows Server 2016+).
HTTP/3
HTTP/3 (2022) replaces TCP with QUIC, a UDP-based protocol, further reducing latency especially on mobile networks.