Featured image of post The Evolution of HTTP Versions and Their Differences

The Evolution of HTTP Versions and Their Differences

Preface

In this “A Plain-Language Guide to Network Protocols” series, we previously introduced the OSI seven-layer model and the TCP/IP four-layer model【】, and also covered the HTTPS protocol and the basic principles behind its encrypted communication 【】. The operation of today’s Internet cannot do without the cornerstone that is the HTTP protocol; yet we can now see multiple different versions of HTTP, such as HTTP/1.1, HTTP/2, and HTTP/3. So what are the differences among these versions, and what are their specific application scenarios? In this article, we will focus on the similarities and differences among these different versions of the HTTP protocol.

Introduction to the HTTP Protocol

Overview

HTTP (Hypertext Transfer Protocol) sits at the application layer of the OSI seven-layer network model, and its core mission is to transfer resources between distributed systems. Its relationship with transport-layer protocols such as TCP/UDP is more one of collaboration.

From its very inception, the HTTP protocol has included the following core characteristics:

  • Stateless design: The server does not store client context information
  • Request/response model: Based on standard request methods and status codes
  • Extensible headers: Metadata transfer via Header fields
  • Cross-platform compatibility: The text-based protocol design ensures interoperability across systems

The HTTP protocol is responsible for transferring hypertext resources between clients and servers. As a stateless protocol, HTTP does not retain records of client interactions, and each request is handled independently. This protocol specification unified the way Web resources are accessed, made it compatible with all kinds of operating systems and devices, and allows functional extension through header fields. It is the foundational protocol of today’s Internet world.

Protocol Composition

HTTP communication is based on the request/response model and is transmitted over the TCP/IP protocol stack:

Request message structure: For example:

1
2
3
4
5
6
7
POST /api/v1/users HTTP/1.1
Host: api.example.com
Content-Type: application/json
Authorization: Bearer xyz123
Content-Length: 48

{"name":"John","email":"john@example.com"}

Response message structure:

For example:

1
2
3
4
5
6
7
HTTP/1.1 201 Created
Location: /api/v1/users/789
Content-Type: application/json
Date: Mon, 15 Jul 2024 09:28:53 GMT
Content-Length: 35

{"id":789,"status":"created"}

HTTP Methods

HTTP methods define the operational semantics for network resources. The table below summarizes the application scenarios of the different HTTP methods

MethodIdempotencySafetyApplication ScenarioRESTful Practice Example
GETYesYesRetrieve a resourceQuery user information
POSTNoNoCreate a resource / perform an actionCreate a new order
PUTYesNoFull update of a resourceUpdate user profile
DELETEYesNoDelete a resourceCancel an order
PATCHNoNoPartial update of a resourceModify the order address
HEADYesYesRetrieve header metadataCheck whether a resource exists
OPTIONSYesYesRetrieve methods supported by the serverCORS preflight request

HTTP Status Codes

A status code is the result of request processing, represented by a three-digit number in the response message.

CategoryCommon Status CodesTechnical MeaningApplication Scenario
1xx101Protocol switchWebSocket upgrade
2xx200/201/204Successful processingResource created successfully
3xx301/302/304Redirect / cache validPermanent move / temporary redirect
4xx400/401/404Client errorParameter error / unauthorized / resource not found
5xx500/502/503Server errorService crash / gateway error / overload

The Different Versions and Evolution of HTTP

Evolution roadmap:

1
2
3
4
5
6
7
timeline
    title Evolution of HTTP Versions
    1991 : HTTP 0.9
    1996 : HTTP 1.0
    1997 : HTTP 1.1
    2015 : HTTP 2
    2020 : HTTP 3

HTTP/0.9 (1991)

The original version of the HTTP protocol had no version number; it was only later, to distinguish it from subsequent versions, that it was defined as version 0.9. It was based on the initial protocol designed by Dr. Tim Berners-Lee for transferring internal documents at CERN, and is also known as the one-line protocol (one-line).

This protocol was extremely simple:

Request:

1
GET /mypage.html

The response contained only the page document itself, and there were no message headers either:

1
2
3
<html>
  This is a very simple HTML page
</html>

Its limitations were equally obvious:

This protocol could not support complex Web applications; it could only transfer plain HTML documents, and it had no status codes to reflect the state of communication.

HTTP/1.0 (1996)

As networks developed and the use of browsers and servers grew rapidly, the HTTP protocol also found wider application. Many features were added on top of the original protocol, and in 1996 these were consolidated and standardized in the specification document RFC 1945, which defined HTTP/1.0. However, this protocol was not an official standard; it was a narrowly standardized version.

Core improvements of HTTP/1.0:

  1. Introduced a version identifier (HTTP/1.0)
  2. Added status codes (200/404, etc.)
  3. Supported header fields (Content-Type/Cache-Control)
  4. Extended methods (POST/HEAD)

The communication process was as follows:

1
2
3
4
5
sequenceDiagram
    Client->>Server: GET /index.html (Connection 1)
    Server->>Client: 200 OK + Close
    Client->>Server: GET /style.css (Connection 2)
    Server->>Client: 200 OK + Close

However, this standard had a crucial performance-overhead problem:

  • Short-lived connections, with each resource using a separate connection, incur heavy TCP handshake overhead
  • No compression / caching mechanism

HTTP/1.1 (1997)

To address the inefficiency of loading Web page resources, work on the official standardization of the HTTP protocol had actually begun even before the release of HTTP/1.0. RFC 2068 was published in 1997 (some also regard the 1999 revision RFC 2616 as the HTTP/1.1 standard), and a further revision, RFC 7235, was published in 2014.

The HTTP/1.1 version was extremely successful and remains widely used to this day. It introduced the following major features:

FeatureImplementation MechanismPerformance Improvement
Persistent connectionsConnection: keep-aliveReduces TCP handshakes by 60%
PipeliningSending requests in batchesTheoretical throughput increase of 30%
Chunked transferTransfer-EncodingSupports streaming of large files
Content negotiationAccept header familySupport for multi-format resources

To improve efficiency, the HTTP/1.1 protocol provided a pipelining mechanism, which allows the client to send multiple requests to the server at the same time to boost efficiency. The problem here, however, is that although client-side efficiency is improved, the server can still only return responses one at a time. This is the Head-of-Line Blocking (Head-of-Line Blocking) problem.

1
2
3
4
5
6
7
sequenceDiagram
    Client->>Server: Request A (large file download)
    Client->>Server: Request B (small file)
    Server->>Client: Response A processing... (blocked)
    Note over Server: Request B is complete but must wait
    Server->>Client: Response A 
    Server->>Client: Response B

Other limitations:

In addition, although this version introduced a compression mechanism, it did not provide compression support for message headers, so considerable performance waste remained.

Moreover, because of the stateless nature of HTTP/1.1, the server can still only passively wait for the client to submit state information.

HTTP/2 (2015)

As Web applications on the Internet grew richer and network bandwidth increased, the demands on transferred content became ever higher. To further improve the transfer efficiency of the HTTP protocol and address its lingering issues, RFC 7540 was published in 2015 as an improvement built on Google’s SPDY protocol.

In HTTP/2, the following major improvements were made:

  1. Binary frames: It uses binary instead of a text protocol, so it is no longer human-readable and cannot be created manually without assistance.
  2. Multiplexing: Concurrent transfer over a single connection
  3. Header compression: Message headers are compressed using the HPACK algorithm, reducing overhead by 70-85%
  4. Server push: Proactively sending associated resources, allowing the server to populate data in the client’s cache

Limitations:

Although HTTP/2.0 proposed the use of multiplexing to solve Head-of-Line Blocking, the actual results were not ideal. The root cause is that the HTTP protocol is an application-layer protocol built on top of TCP; that is, even though multiplexing is possible at the application layer, at the transport layer, because of TCP’s retransmission mechanism, one still has to wait for transport-layer messages to return one by one; in other words, Head-of-Line Blocking still exists at the TCP layer.

HTTP/3 (2020)

To completely solve the Head-of-Line Blocking problem, HTTP/3 was introduced in 2020. The biggest change in this protocol is a thorough restructuring of the protocol stack: the transport layer is no longer based on TCP, but on the QUIC protocol over UDP.

Because UDP is designed without TCP’s packet-loss retransmission mechanism, its communication efficiency is greatly improved over TCP; and QUIC’s redesigned communication method, while offering reliability nearly equivalent to a TCP connection, greatly reduces latency.

Currently, more than 95% of browsers already support the HTTP/3 protocol, and more than 30% of websites have also begun to support HTTP/3.

Summary

The main differences among the different HTTP versions described above can be summarized as follows:

VersionCore ContributionMain LimitationAdoption Rate(2024 )
0.9Established the request/response modelOnly supports GET0%
1.0Introduced headers / status codesInefficient short-lived connections<1%
1.1Persistent connections / pipeliningHead-of-Line Blocking52%
2Binary framing / header compressionBlocking at the TCP layer96%
3QUIC protocol / connection migrationInfrastructure support still maturing39%

According to the Cloudflare 2024 report: HTTP/3 already accounts for 35% of global HTTP traffic and is expected to become the dominant protocol by 2026. The continuous evolution of the HTTP protocol reflects the technical response of Internet infrastructure to the demands for performance, security, and mobility. Developers need to deeply understand the characteristics of each version in order to build high-performance applications adapted to future network environments.

Built with Hugo
Theme Stack designed by Jimmy