HTTP Versions

Understanding the Evolution of the Hypertext Transfer Protocol

Introduction to HTTP

The Hypertext Transfer Protocol (HTTP) is the foundation of data communication for the World Wide Web. It defines how messages are formatted and transmitted, and what actions web servers and browsers should take in response to various commands. Over the years, HTTP has evolved significantly to improve performance, efficiency, and security.

HTTP/1.0 (1996)

HTTP/1.0 was the first widely adopted version of the protocol. It was a stateless, request-response protocol where each request required a new TCP connection. This led to inefficiencies, especially for pages with multiple embedded resources (images, CSS, JavaScript).

A typical HTTP/1.0 request looked something like this:

GET /index.html HTTP/1.0
Host: www.example.com
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

HTTP/1.1 (1997, updated 1999, 2014)

HTTP/1.1 introduced significant improvements to address the limitations of HTTP/1.0. It brought persistent connections, pipelining, and more robust header handling, making web browsing much more efficient.

Key features introduced or standardized:

An HTTP/1.1 request example:

GET /resource.css HTTP/1.1
Host: www.example.com
User-Agent: Chrome/91.0.4472.124
Accept: */*
Connection: Keep-Alive

HTTP/2 (2015)

HTTP/2 represents a major leap forward, designed to address the performance bottlenecks of HTTP/1.1, particularly head-of-line blocking. It achieves this through binary framing, multiplexing, header compression, and server push.

HTTP/2 is typically used over TLS (HTTPS) for security, though it's not strictly required.

HTTP/3 (2022)

HTTP/3 is the latest major version, built on top of QUIC (Quick UDP Internet Connections), a new transport protocol developed by Google. QUIC aims to further reduce latency and improve reliability, especially on lossy networks.

Key Differences and Evolution

Feature HTTP/1.0 HTTP/1.1 HTTP/2 HTTP/3
Transport Protocol TCP TCP TCP (typically) QUIC (over UDP)
Connection Model Short-lived Persistent (Keep-Alive) Persistent, Multiplexed Persistent, Multiplexed, Connection Migration
Data Format Text Text Binary Binary
Multiplexing No Limited (Pipelining) Yes (per connection) Yes (per connection)
Header Compression No No HPACK HPACK
Head-of-Line Blocking Yes (TCP level) Yes (TCP level & Pipelining) Reduced (HTTP level), but TCP HOL remains Eliminated (QUIC level)
Server Push No No Yes Yes
Connection Establishment TCP handshake + TLS handshake TCP handshake + TLS handshake TCP handshake + TLS handshake QUIC (combined transport/TLS handshake)