100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Web

HTTP/2

IntermediateProtocol4.4K learners

1 through multiplexed requests over a single connection, header compression, and server push, while preserving the same request/response semantics web developers already rely on.

Definition

HTTP/2 is a major revision of the HTTP protocol that improves performance over HTTP/1.1 through multiplexed requests over a single connection, header compression, and server push, while preserving the same request/response semantics web developers already rely on.

Overview

HTTP/1.1, standardized in 1997, had a well-known limitation: each connection could only have one outstanding request at a time (without pipelining hacks that browsers rarely supported well in practice), forcing browsers to open multiple parallel TCP connections to load a page's many assets, each with its own connection-setup overhead. HTTP/2, standardized in 2015 and based on Google's earlier SPDY protocol, solves this with multiplexing: many requests and responses can be interleaved over a single TCP connection, eliminating the need for connection-hungry workarounds like domain sharding that developers previously used to work around HTTP/1.1's limits. Beyond multiplexing, HTTP/2 introduced header compression (HPACK), which reduces the often-repetitive overhead of HTTP headers sent with every request, and server push, which lets a server proactively send resources a client is likely to need before it explicitly asks for them (though push has seen limited real-world adoption and was later deprecated in some browsers in favor of other techniques). Critically, HTTP/2 is a binary protocol under the hood rather than HTTP/1.1's plain text, but it preserves the same familiar methods, status codes, and headers, so existing REST APIs and web applications generally work over HTTP/2 without code changes — the improvement is transparent at the application layer. HTTP/2 requires TLS in practice (via an SSL/TLS certificate) for all major browsers, even though the specification technically allows unencrypted HTTP/2, which further accelerated the industry-wide move to HTTPS-by-default. Most Content Delivery Network (CDN)s, modern web servers like Nginx, and hosting platforms support HTTP/2 automatically today, and the newer HTTP/3, built on the QUIC transport protocol instead of TCP, is now emerging as its successor for further reducing latency, particularly on unreliable networks.

Specification

  • Multiplexes many requests over a single TCP connection
  • Header compression (HPACK) reduces redundant request overhead
  • Server push allows proactively sending likely-needed resources
  • Binary protocol framing, unlike HTTP/1.1's plain text
  • Requires TLS/HTTPS in practice across all major browsers
  • Preserves familiar HTTP methods, status codes, and semantics

Use Cases

Speeding up page loads with many small assets (images, scripts, CSS)
Reducing connection overhead for API-heavy web applications
Eliminating the need for domain sharding workarounds
Improving mobile performance on higher-latency networks
Serving modern web apps through CDNs and reverse proxies
Supporting REST APIs without requiring any code changes

History

HTTP/2 is a major revision of the Hypertext Transfer Protocol, published by the IETF's HTTP Working Group as RFC 7540 on May 14, 2015. It was derived from SPDY, an experimental protocol originally developed by Google to reduce web page load latency; SPDY's core contributors carried that work into the IETF standardization effort beginning around 2012. Unlike HTTP/1.1's text-based, one-request-per-connection model, HTTP/2 introduced binary framing, full multiplexing of concurrent streams over a single connection, header compression (HPACK), stream prioritization, and server push. After HTTP/2 was ratified, Google announced it would deprecate and withdraw SPDY. HTTP/2 was rapidly adopted by major browsers and servers and remains widely deployed alongside its successor, HTTP/3.

Frequently Asked Questions