HTTP/2 is the second major version of the HTTP protocol, standardized in 2015. It was designed to overcome the performance limitations of HTTP/1.1, which was defined in 1997, and significantly improves web page loading speed.
The biggest problem with HTTP/1.1 was that a single TCP connection could only process one request at a time. Browsers opened multiple TCP connections to fetch resources in parallel, but the connection limit (typically 6) caused queuing delays on resource-heavy pages. HTTP/2 solves this with multiplexing, allowing multiple requests and responses to be processed simultaneously over a single TCP connection.
HTTP/2 introduces three major improvements. First, multiplexing (parallel processing of multiple requests over one connection). Second, header compression (reducing HTTP header size with the HPACK algorithm). Third, server push (proactively sending resources before the client requests them).
HTTP/2 matters for URL shortening redirect performance. Multiplexing speeds up page loading after the redirect, and header compression reduces the size of the redirect response itself. According to W3Techs, approximately 35% of all websites were using HTTP/2 as of 2024.
HTTPS is effectively required for HTTP/2. While the specification allows HTTP, major browsers only support HTTP/2 over HTTPS connections. Therefore, deploying HTTP/2 goes hand in hand with SSL/TLS certificate configuration. In 2022, the successor protocol HTTP/3 (based on QUIC) was also standardized, pushing performance even further. Related books are also available on Amazon.