Fact-checked by Grok 2 weeks ago

HTTP

The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. It serves as the foundational protocol for data communication on the , enabling the transfer of hypermedia documents between clients and servers. Developed by while working at in 1989, HTTP was initially proposed as part of the project to facilitate information sharing among researchers. HTTP operates on a request-response model, where clients (such as web browsers) send requests to servers using methods like GET (to retrieve resources) or (to submit data), and servers respond with status codes (e.g., 200 OK for success or 404 Not Found for missing resources) along with the requested content, headers, and metadata. This structure supports the stateless nature of HTTP, meaning each request is independent and does not retain information from previous interactions unless explicitly managed through mechanisms like or sessions. Key features include support for various content types (e.g., , images, ), caching directives to improve efficiency, and security enhancements in later versions, such as (HTTP over TLS) for encrypted communication. The protocol has evolved through several to address , , and needs. HTTP/0.9, the unversioned in 1991, was a simple text-based limited to retrieving HTML documents via GET requests without headers or status codes. HTTP/1.0, standardized in 1945 in 1996, introduced headers, status codes, and support for multiple content types but remained connection-oriented and prone to latency issues like the "." HTTP/1.1, defined in 2068 (1997) and refined in 2616 (1999) and later 9110 (2022), added persistent connections, pipelining, , and better caching, making it the dominant version for over two decades. Subsequent updates focused on multiplexing and reduced latency: HTTP/2, standardized in RFC 7540 in 2015, introduced binary framing, header compression (HPACK), server push, and stream over a single connection to overcome HTTP/1.1 limitations. HTTP/3, published as 9114 in 2022, shifts to the transport protocol (over ) for faster connection establishment, built-in encryption, and migration-resistant streams, further enhancing performance in modern networks. Today, underpins nearly all , with ongoing work by the IETF ensuring its adaptability to emerging technologies like and real-time applications.

Overview

Technical overview

HTTP (Hypertext Transfer Protocol) is a stateless application-level for distributed, collaborative, hypertext systems, serving as the foundational for data communication on the by enabling the transfer of hypertext and other resources between clients and servers. It operates on a request-response model, in which clients—such as web browsers—initiate requests to servers, which process these requests and return corresponding responses containing the requested resources or . This model facilitates a uniform for accessing and manipulating resources identified by uniform resource identifiers (URIs), ensuring interoperability across diverse systems. A defining characteristic of HTTP is its , meaning that each request from a client to a must contain all the necessary for the to understand and respond, with no for the to retain or from previous requests. While this design promotes by allowing servers to handle requests independently, it can be extended through mechanisms like or sessions to simulate statefulness when needed for applications requiring continuity, such as user authentication. The core components of HTTP include URIs, which uniquely identify resources; messages structured as requests and responses; methods that specify the intended action (e.g., retrieval or modification); status codes that indicate the outcome of the server's processing; and headers that carry about the message, such as content type or caching directives. These elements collectively define the semantics shared across HTTP versions. In its basic flow, a client establishes a —typically over /—and sends an HTTP request message to the , which parses the request, performs the necessary operations on the identified resource, and transmits a response message back to the client. This exchange occurs at the , abstracting the underlying transport details while relying on reliable protocols like for delivery. HTTP's extensibility is inherent in its design, allowing new methods and headers to be introduced without disrupting existing implementations, which has enabled ongoing enhancements for performance and functionality in later versions such as and HTTP/3.

Role in the web

HTTP serves as the foundational for client-server interactions in the , facilitating the retrieval and exchange of resources such as web pages, images, and data between browsers or applications and servers. It underpins web browsing by enabling users to access hypertext documents and multimedia content through a standardized request-response mechanism, while also powering application programming interfaces (APIs), particularly RESTful services that allow disparate systems to communicate seamlessly. In the (IoT), HTTP supports lightweight data exchange between devices and cloud services, enabling real-time monitoring and control in applications like smart homes and industrial sensors. As of November 2025, HTTP and its secure variant dominate web traffic, with over 95% of websites on utilizing , reflecting its near-universal adoption for secure data transmission. , the latest version, has achieved approximately 35.9% usage among websites globally, driven by its performance improvements and support in major browsers and servers. This widespread adoption underscores HTTP's evolution from serving static pages in the early to handling dynamic, data-intensive interactions in modern applications. HTTP integrates closely with other core technologies to form the backbone of architecture: the (DNS) resolves human-readable domain names to addresses for requests, while transport protocols like (for HTTP/1.x and ) or (for ) ensure reliable data delivery over networks. Security is layered on via (TLS), which encrypts HTTP traffic to protect against eavesdropping and tampering, a standard practice since the protocol's maturation. This interoperability extends to HTTP's influence on standards, where it drives the loading of documents, execution of for dynamic content via asynchronous requests (/Fetch API), and optimization through content delivery networks (CDNs) that cache and distribute resources closer to users for reduced . In contemporary computing paradigms, HTTP remains essential for architectures, where services communicate via HTTP-based APIs to enable scalable, loosely coupled systems. It supports by allowing event-driven functions to invoke and respond over HTTP endpoints, abstracting infrastructure management for developers. Similarly, in , HTTP facilitates low-latency interactions between edge nodes and central services, processing data closer to the source in distributed environments like 5G networks and deployments.

History

Origins and early development (1989–1996)

In March 1989, , a British physicist working at , proposed an information management system to facilitate the sharing of scientific documents among researchers across the organization. The proposal outlined a hypertext-based system using a distributed network of documents linked via hyperlinks, addressing the challenges of fragmented information silos in high-energy physics collaborations. This initiative aimed to create a universal, platform-independent method for accessing and linking data over existing networks like TCP/IP, without requiring centralized databases. By 1991, Berners-Lee had implemented the first version of the Hypertext Transfer Protocol (HTTP), designated as HTTP/0.9, as part of the project at . HTTP/0.9 was a minimalist, request-response protocol limited to the GET method for retrieving simple hypertext documents, typically in a plain-text format resembling early , transmitted over connections. It prioritized simplicity and speed to enable quick document retrieval in a distributed environment, serving as the foundational transport mechanism for the web's initial public demonstration in August 1991. In response to growing adoption and the need for more robust features, early drafts of emerged between and 1993, introducing elements like request headers, response status codes, and additional methods beyond GET to support and error handling. These developments were influenced by contemporary protocols such as WAIS for search and retrieval and for menu-driven navigation, which highlighted the demand for extensible, hypermedia-oriented information access over the . The formation of the IETF HTTP Working Group in formalized these efforts, coordinating input from the broader community via mailing lists like www-talk to refine the protocol for wider interoperability. The culmination of this period came with the release of RFC 1945 in May 1996, which documented HTTP/1.0 as an informational specification reflecting common implementations and enabling broader adoption across diverse hosts. This version addressed key challenges in early deployment, such as efficient data transfer over unreliable networks and extensibility for future enhancements, solidifying HTTP as a simple yet scalable protocol layered atop TCP/IP.

HTTP/1.1 standardization and dominance (1997–2009)

The Hypertext Transfer Protocol version 1.1 (HTTP/1.1) was initially standardized as a provisional specification in 2068, published by the (IETF) in January 1997. This document formalized HTTP/1.1 as an update to HTTP/1.0, addressing ambiguities in the earlier version and introducing enhancements for better performance and reliability. In June 1999, 2616 superseded 2068, providing clarifications on critical areas such as caching directives and persistent connections to resolve implementation inconsistencies observed in early deployments. Key features of HTTP/1.1 included support for persistent connections—also known as "keep-alive"—which allowed multiple requests and responses over a single connection, reducing overhead compared to the per-request connections in HTTP/1.0. Pipelining enabled clients to send multiple requests without waiting for responses, further optimizing bandwidth usage, while permitted servers to stream content in variable-sized blocks without specifying the total length upfront. These innovations, along with improved cache control and the mandatory header for , made HTTP/1.1 more efficient for growing web applications. During the late 1990s and early 2000s, HTTP/1.1 rapidly gained dominance, powering the explosive growth of the amid the dot-com boom. Major browsers, including 3.0 (released in 1996) and 4.0 (released in 1997), fully implemented HTTP/1.1, enabling seamless integration with emerging web technologies and contributing to the surge in online commerce and content delivery. By the mid-2000s, HTTP/1.1 had become the , handling the vast majority of web traffic as internet usage expanded globally. The IETF provided ongoing maintenance for HTTP/1.1 through errata reports and clarifications, ensuring compatibility as implementations proliferated. In 2007, the HTTP Bis working group was chartered to revise and clarify the protocol specifications, culminating in a series of updates by 2009 that addressed lingering ambiguities without introducing major changes. However, as web pages grew more resource-intensive with embedded objects like images and scripts, limitations of HTTP/1.1 began to emerge, particularly in pipelined requests and increased latency over high-latency networks, which hindered performance in mobile and broadband environments.

HTTP/2 introduction (2010–2015)

In November 2009, Google introduced , an experimental application-layer protocol designed to accelerate by addressing key limitations of HTTP/1.1, such as the inefficiency of establishing multiple connections per page and that delayed resource delivery. enabled multiplexing of multiple requests and responses over a single connection, compressed HTTP headers to reduce overhead, and prioritized traffic to minimize latency, achieving up to a 64% reduction in page load times in controlled tests. These improvements were particularly motivated by the growing demands of the , where slow network conditions and high latency amplified HTTP/1.1's bottlenecks, leading to poorer user experiences on bandwidth-constrained devices. The success of SPDY prompted the revival of the IETF's HTTP Working Group (httpbis) in 2011, tasked with clarifying and updating HTTP specifications while exploring performance enhancements. Influenced by SPDY's concepts, the group chartered the development of a new HTTP version that preserved HTTP/1.1's application semantics but introduced a more efficient wire protocol, with initial drafts directly based on SPDY's multiplexing and compression mechanisms. Over the following years, collaborative efforts refined these ideas through multiple iterations, incorporating feedback from implementers to ensure broad compatibility and security, culminating in a consensus-driven specification. HTTP/2 was officially standardized as 7540 in May 2015, defining a that layered HTTP messaging over SPDY-inspired framing. Key innovations included framing for all messages, which replaced text-based with compact, structured frames to lower processing overhead; to eliminate redundant data across requests; server push, allowing proactive resource delivery without client requests; and stream multiplexing, enabling concurrent, interleaved transmission of multiple request-response pairs on one connection without blocking. These features collectively aimed to reduce latency and bandwidth usage while maintaining backward compatibility with HTTP/1.1 semantics. The protocol's development was driven by the explosive growth of mobile usage and the need for sub-second page loads to retain users, with early implementations demonstrating significant speed gains on resource-heavy sites. Google integrated support into starting with version 40 in early 2015, enabling it over TLS connections to leverage and for faster browsing. By 2016, major browsers including (from version 36), (from version 9), and had enabled by default, accelerating its adoption among web servers and content providers.

HTTP/3 adoption and protocol refactoring (2016–present)

In 2016, the (IETF) initiated the development of through its QUIC , adapting Google's transport protocol to address limitations in prior HTTP versions by enabling reduced latency through integrated encryption and 0-RTT connection establishment, as well as seamless connection migration across network changes. HTTP/3 was formally standardized as RFC 9114 in June 2022, defining a mapping of semantics onto the protocol, which operates over to support , flow control, and error recovery at the without relying on . This approach preserves HTTP's request-response model while leveraging QUIC's built-in congestion control and reliability features to improve performance in lossy networks. Accompanying the HTTP/3 standard, the IETF undertook a comprehensive refactoring of HTTP specifications in , consolidating and updating core documents to enhance clarity and across versions: 9110 for HTTP semantics, 9111 for caching, 9112 for HTTP/1.1, and 9113 for , while deprecating earlier specifications such as 2616. These updates separated transport-independent elements from version-specific details, facilitating future extensions without fragmenting the protocol ecosystem. Adoption of accelerated following browser enablement, with enabling it by default in April 2020 and following in May 2021, though experimental support appeared in nightly builds as early as 2019. By late 2024, major content delivery networks including , Akamai, and had implemented widespread support, driving support to approximately 34% of the top 10 million websites and usage to 20.5% of global web requests. As of November 2025, support was in use by 36.2% of all monitored websites, reflecting steady growth from around 15-18% in 2022, though actual request usage remains lower at around 20% based on 2024 data. Ongoing IETF efforts focus on extensions enhancing and functionality, such as Oblivious HTTP (RFC 9458, published in 2023), which enables request forwarding to prevent between clients and servers. No major new HTTP version beyond has been announced as of 2025. Deployment challenges persist, particularly with firewalls blocking traffic, necessitating automatic fallback to over , which can introduce minor penalties during connection races.

Message Exchange

Connections and persistent sessions

HTTP connections are typically established over the underlying transport protocol using a client-server model. For HTTP/1.x, this involves a three-way to create a reliable, ordered between the client and , as defined in the specification. The default ports are 80 for unencrypted HTTP and 443 for , which uses TLS over to secure the connection. In contrast, HTTP/3 employs as its transport, a UDP-based protocol that integrates TLS 1.3 encryption and enables faster connection setup by combining and encryption processes. Persistent connections, introduced to mitigate the overhead of repeatedly establishing new transport connections, became the default in HTTP/1.1 via the Connection: keep-alive header field. Unlike HTTP/1.0, where connections closed after each response, this reuse allows multiple request-response exchanges over a single connection, reducing latency and resource consumption associated with TCP handshakes and TLS negotiations. However, HTTP/1.1 pipelining—sending sequential requests without waiting for prior responses—can introduce head-of-line (HOL) blocking, where a delayed response stalls subsequent ones on the same connection. HTTP is inherently stateless, meaning each request is independent and servers do not retain about prior interactions unless explicitly managed. Session management extends this statelessness using mechanisms like , where servers set via the Set-Cookie response header and clients return it in subsequent Cookie request headers. Alternative tokens, such as session IDs, can also maintain across requests. advances efficiency by multiplexing multiple streams over a single , eliminating HOL blocking at the while preserving persistence. builds on this with QUIC's stream-based multiplexing, adding features like 0-RTT resumption, which allows clients to send data on the first packet of a resumed using cached session , further accelerating reconnections. Optimizations in HTTP/2 and later versions include connection coalescing, where clients reuse an existing connection for requests to multiple virtual hosts (authorities) sharing the same IP address and port, based on matching the :authority pseudo-header. This reduces the number of concurrent connections and associated overhead.

Request-response cycle

The HTTP request-response cycle constitutes the core mechanism of message exchange in the protocol, operating in a stateless fashion where each request is independent of any prior interactions unless explicitly indicated by headers or other mechanisms. The process begins when a client, such as a web browser, parses a Uniform Resource Identifier (URI) to identify the target resource, resolve the host, and determine the connection endpoint, which may involve an origin server or intermediary. The client then constructs and sends an HTTP request message comprising a start line (method, request-target, and version), header fields, and an optional message body. Upon receipt, the server routes the request to an appropriate handler based on the target URI, processes it according to the method's semantics (e.g., retrieving or modifying the resource), and generates a response message with a status code, headers, and optional body, which is transmitted back along the same path. The client processes the response, such as rendering the content for display or executing further logic, completing the cycle. Intermediaries play a pivotal in modifying the by intercepting and altering message flow between client and origin server. Proxies forward requests and responses, potentially injecting headers like Via to trace the transmission path, while also enforcing security policies or load balancing. Gateways function as protocol converters, treating inbound requests as if received directly and outbound responses as originating from themselves. Caches store prior responses and may satisfy subsequent requests from storage if the cached remains valid, thereby reducing origin server load and improving efficiency without altering the logical structure. Error handling ensures robustness in the cycle through timeout detection and retry logic, particularly emphasizing idempotency to avoid unintended side effects. Clients implement timeouts to abandon unresponsive connections, after which they may retry the request if the method is idempotent—such as GET, HEAD, PUT, DELETE, OPTIONS, or —since repeating these yields the same result as a single invocation. Servers signal errors via status codes in responses, including 4xx codes for client issues (e.g., Bad Request for malformed syntax) and 5xx codes for server failures (e.g., 503 Service Unavailable prompting potential retries), enabling clients to diagnose and respond without assuming persistence. Content negotiation refines the cycle by allowing clients to influence response delivery through request headers, ensuring the server provides an appropriate representation. The header specifies preferred media types (e.g., text/html;q=1.0, application/json;q=0.9), while Accept-Language, Accept-Charset, and Accept-Encoding indicate language, character set, and compression preferences, respectively; the server evaluates these to select and deliver the best-matching body format, or returns 406 Not Acceptable if none suffice. This proactive mechanism occurs prior to response generation, tailoring the output to client capabilities without requiring multiple cycles. In practical applications, the iterates recursively to fetch composite resources; for instance, a successful GET response delivering an document prompts the client to parse it and initiate subsequent cycles for linked assets like images or stylesheets, each treated as an , stateless . This relies on the client's of response but adheres to the protocol's model.

Requests

Syntax and structure

In HTTP/1.1, a request message consists of three main parts: the request line, the header section, and an optional message body. The request line begins the request and follows the generic start-line format, but is specifically structured as [method](/page/Method) SP request-target SP HTTP-version, terminated by a line feed (CRLF). Here, method identifies the request (e.g., "GET"), request-target specifies the target resource in one of four forms—origin-form (e.g., "/index."), absolute-form (full ), authority-form ( and , used in CONNECT), or asterisk-form ("*" for OPTIONS)—and HTTP-version denotes the protocol version (e.g., "HTTP/1.1"). The Host header is mandatory in HTTP/1.1 to support . The header section immediately follows the request line and comprises zero or more header fields, each on its own line in the form field-name ":" OWS field-value OWS, where OWS denotes optional whitespace. This section is client-generated, conveying such as the target host, accepted content types, or authentication credentials. The header section ends with an empty line (CRLF CRLF), which delimits it from the body if present. The message , if included, follows the header section and contains the data (e.g., form data in requests), represented as a sequence of octets (*OCTET). Its presence and length are determined by headers like Content-Length or Transfer-Encoding, or by connection closure in the absence of such indicators; the is optional for requests that do not require transmission, such as GET. For example, a complete HTTP/1.1 request might appear as:
GET /index.html HTTP/1.1
Host: www.example.com
Accept: text/html
In versions and later, the textual format of HTTP/1.1 is replaced by a framing layer, where requests are expressed through frames such as HEADERS (carrying pseudo-headers like :, :, :, and other fields) and (for the ), but the underlying semantics of the request line, headers, and remain identical to HTTP/1.1. The appears as the :method pseudo-header field within the HEADERS frame.

Methods

HTTP request methods specify the intended action to be performed by a client on a given at a server, forming a core part of the protocol's semantics across all versions. These methods are registered with the (IANA) and can be extended through standardized processes, ensuring interoperability. Each method carries specific semantics regarding its effect on the , and they are classified by key properties: (no state changes on the server), idempotency (repeated identical requests produce the same result and side effects), and cacheability (responses can be stored and reused). All standard methods defined in HTTP/1.1 are preserved with identical semantics in and , though the underlying framing and transport differ. Safe methods are defined as read-only operations that do not request any state changes on the server, allowing user agents to prefetch or cache responses without risk. The primary safe methods include GET, which retrieves a representation of the target ; HEAD, which behaves like GET but omits the message body in the response to fetch only ; OPTIONS, which describes the communication options available for the target or server; and , which performs a loop-back test to echo the received request for debugging purposes. Extensions like from retrieve properties () of a , supporting scoped queries via a Depth header and returning results in a multistatus XML format. All safe methods are also idempotent by definition. Idempotent methods ensure that retrying a failed request does not result in unintended side effects, making them suitable for unreliable networks. Beyond the safe methods, PUT replaces the target 's state with the request , creating the resource if it does not exist, while DELETE removes all current representations of the target from the . TRACE is idempotent as a method, and POST can be treated as idempotent in specific variants using conditional requests (e.g., with If-Match headers based on entity tags) to avoid duplicate effects, though POST is not inherently idempotent. Non-idempotent methods like standard POST process the request according to resource-specific semantics, such as submitting that may create new resources or trigger side effects, and thus repeated invocations can lead to different outcomes. Regarding cacheability, responses to GET and HEAD are inherently cacheable, enabling intermediaries to store and reuse representations for efficiency. POST responses are cacheable only under strict conditions: explicit freshness information (e.g., via Expires or Cache-Control headers) must be present, and the Content-Location header must match the effective request . Other methods like PUT, DELETE, OPTIONS, and have no defined caching semantics unless specified otherwise, though safe method responses can be cached if freshness is indicated. For extensions, applies partial modifications to a using a patch document and is not cacheable by default, though conditional variants can enhance idempotency. PROPFIND responses are generally not cacheable due to the dynamic nature of properties. New HTTP methods can be defined and registered via the IETF process in the IANA HTTP Method Registry, promoting extensibility while maintaining protocol stability; for instance, was standardized in 5789 for partial updates, distinguishing it from PUT's full replacement semantics.
MethodSemanticsSafeIdempotentCacheable
GETRetrieve resource representationYesYesYes
HEADRetrieve metadata onlyYesYesYes
OPTIONSQuery communication optionsYesYesIf freshness indicated
Diagnostic loop-backYesYesNo
PROPFINDRetrieve resource properties ()YesYesNo
Process payload, e.g., createNoNo (conditional variants yes)If conditions met
PUTReplace or create resource stateNoYesNo
DELETERemove resourceNoYesNo
Apply partial modificationsNoNo (conditional variants yes)If conditions met

Header fields in requests

HTTP request header fields provide metadata from the client to the server, specifying directives such as the target resource, client capabilities, and conditional requirements for processing the request. These fields are case-insensitive and extensible, allowing clients to convey preferences for content negotiation, caching behavior, and security credentials. Among the general request headers, the Host field is mandatory in HTTP/1.1 and later versions to support virtual hosting, indicating the Internet host and port number of the resource being requested, formatted as "hostname[:port]". For example, Host: example.com specifies the target domain. The User-Agent field identifies the requesting user agent, typically including software name, version, and operating system details, such as User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36. This aids servers in optimizing responses or logging. The Accept field enables content negotiation by listing media types the client can handle, using quality values (q-values) from 0 to 1, like Accept: text/html;q=1.0, application/json;q=0.9. Request modifier headers allow clients to impose conditions or request specific handling. The field carries credentials to authenticate the client, formatted according to schemes like or Bearer, such as Authorization: Basic dXNlcjpwYXNz. (Details on authentication schemes are covered separately.) The If-Match header makes a request conditional on the current entity tag (ETag) of the resource, preventing overwrites if the resource has changed; for instance, If-Match: "686897696a7c876b7e" requires the ETag to match exactly. The Range header requests partial content, typically byte ranges, as in Range: bytes=0-999 to retrieve the first 1000 bytes. Common examples include the Cache-Control directive, which instructs caches on handling, such as Cache-Control: no-cache to bypass caches and fetch fresh content. The Expect header signals server expectations before sending a large body, notably Expect: 100-continue to receive a 100 Continue status if the request is acceptable. All HTTP header fields, including those for requests, are managed by the Internet Assigned Numbers Authority (IANA) through a registry distinguishing permanent and provisional entries. Permanent fields require a published specification and expert review, while provisional ones undergo lighter scrutiny for experimental use; new registrations or changes are submitted via the IANA interface or mailing list. In HTTP/2, these fields (along with pseudo-headers like :method) are compressed using HPACK to reduce overhead on repeated transmissions.

Responses

Syntax and structure

In HTTP/1.1, a response message consists of three main parts: the status line, the header section, and an optional message body. The status line begins the response and follows the generic start-line format, but is specifically structured as HTTP-version SP status-code SP [reason-phrase], terminated by a carriage return line feed (CRLF). Here, HTTP-version identifies the protocol version (e.g., "HTTP/1.1"), status-code is a three-digit indicating the response outcome (e.g., ), and reason-phrase is an optional, human-readable description that provides no semantic binding but aids in or (e.g., "" for success or "Not Found" for ). The header section immediately follows the status line and comprises zero or more header fields, each on its own line in the form field-name ":" OWS field-value OWS, where OWS denotes optional whitespace. This section mirrors the structure used in requests but is server-generated, conveying such as content type or caching directives. The header section ends with an empty line (CRLF CRLF), which delimits it from the body if present. The message body, if included, follows the header section and contains the payload data, such as content or binary files, represented as a sequence of octets (*OCTET). Its presence and length are determined by headers like Content-Length or Transfer-Encoding, or by connection closure in the absence of such indicators; the body is optional for responses that do not require transmission. For example, a complete HTTP/1.1 response might appear as:
HTTP/1.1 200 OK
Content-Type: text/[html](/page/HTML)
Content-Length: 123

<html><[body](/page/Body)>Hello</[body](/page/Body)></[html](/page/HTML)>
In versions and later, the textual format of HTTP/1.1 is replaced by a framing layer, where responses are expressed through such as HEADERS (carrying the pseudo-header and other fields) and (for the ), but the underlying semantics of the status line, headers, and remain identical to HTTP/1.1. The code appears as the :status pseudo-header field within the HEADERS .

Status codes

HTTP status codes are three-digit integer values returned by a in the response message to indicate the result of a client's request, providing a standardized way to communicate outcomes across HTTP implementations. These codes are part of the response status line and are grouped into five es based on their first digit, with the semantics of each class defined by the initial digit regardless of the specific code. The classes ensure consistent interpretation, though individual codes within a class may convey nuanced meanings.

1xx Informational

Informational status codes (1xx) provide provisional responses, signaling that the request is being processed and the client should continue without further action unless specified. They are typically used in scenarios involving upgrades or continuations.
  • 100 Continue: Sent by the server to indicate that the client should proceed with sending the request body after submitting headers, confirming that the initial headers are acceptable.
  • 101 Switching Protocols: Indicates that the server is switching to the requested by the client via the header, such as from HTTP/1.1 to HTTP/2.

2xx Success

Success status codes (2xx) indicate that the request was received, understood, and successfully processed by the . The exact meaning depends on the HTTP method used, but these codes generally confirm the intended outcome.
  • 200 : The request succeeded, and the response may include a of the requested .
  • 201 Created: The request resulted in the creation of a new , often accompanied by a header pointing to the new .
  • 204 No Content: The successfully processed the request but returns no content in the response body, suitable for operations like deletions or updates without .

3xx Redirection

Redirection status codes (3xx) suggest that the client needs to take additional action to complete the request, often by redirecting to another URL. These codes facilitate resource relocation without requiring client modifications in all cases.
  • 301 Moved Permanently: The requested resource has been permanently moved to a new URL, and future requests should use the new location.
  • 302 Found: The requested resource resides temporarily under a different URL, and clients should continue to use the original request method for the redirect.
  • 304 Not Modified: Used in conditional requests (e.g., with If-Modified-Since), indicating that the resource has not changed since the specified version, allowing the client to use its cached copy.

4xx Client Error

Client error status codes (4xx) indicate that the server understood the request but cannot fulfill it due to an error on the client's side, such as malformed or parameters. These codes prompt the client to re-examine its request.
  • 400 Bad Request: The cannot process the request due to or unsupported features in the .
  • 401 Unauthorized: The client must authenticate itself to access the resource, typically requiring credentials in subsequent requests.
  • 404 Not Found: The cannot find the requested resource, often due to an incorrect .
  • 429 Too Many Requests: The client has sent too many requests in a given time frame, enforcing to prevent overload.

5xx Server Error

Server error status codes (5xx) signal that the failed to fulfill a valid request, pointing to issues on the server side such as internal failures or upstream problems. Clients may retry after a delay, depending on the code.
  • 500 Internal Error: A error indicating that the encountered an unexpected condition preventing request fulfillment.
  • 502 Bad Gateway: The , acting as a gateway or , received an invalid response from an .
  • 503 Service Unavailable: The is temporarily unable to handle the request due to or overload, suggesting a retry after a specified delay.
HTTP status codes are extensible, allowing new codes to be defined and registered in the IETF's HTTP Status Code Registry without altering the fixed class structure, ensuring backward compatibility. For example, extensions like WebDAV introduce codes such as 207 Multi-Status, which aggregates multiple independent responses into a single message for compound operations. Unregistered codes may be used experimentally but should avoid conflicts with standard assignments.

Header fields in responses

HTTP response header fields provide from the to the client, conveying about the response's , content, caching instructions, and security requirements. These fields are sent after the status line in the response message and help the client process the , manage sessions, and handle redirects or challenges. Unlike request headers, response headers are primarily server-initiated to control client behavior and ensure compliance.

General Headers

General response headers apply broadly to the message and are not tied to the entity body. The header indicates the date and time at which the response was originated by the , using the preferred format HTTP-date (e.g., Date: Wed, 21 Oct 2015 07:28:00 GMT). It serves as timing metadata for caching, conditional requests, and freshness calculations, with servers required to generate it if not provided by proxies. The header contains information about the software used by the origin server to handle the request, typically including product tokens and optional comments (e.g., Server: Apache/2.4.7 (Ubuntu)). Its purpose is to aid in interoperability issues and identifying server capabilities, though servers may omit sensitive details for security. For redirection or resource creation, the header specifies the URI reference for the target resource (e.g., Location: https://example.com/new-page). It is mandatory in 201 (Created) and 3xx (Redirection) status responses to indicate where the client should proceed next.

Entity Headers

Entity headers describe the representation enclosed in the response body. The Content-Type header defines the of the payload, including type, subtype, and parameters like charset (e.g., Content-Type: text/[html](/page/HTML); charset=[UTF-8](/page/UTF-8)). It informs the client how to interpret and render the content, with defaults falling back to application/octet-stream if absent. The Content-Length header declares the size of the in decimal octets (e.g., Content-Length: 1234), enabling the client to know the exact length for transfer encoding and boundary detection. It must be accurate, or the connection risks closure. The header provides an opaque entity tag as a for the selected (e.g., ETag: "686897696a7c876b7e"), often a of the content. It supports efficient caching by allowing clients to check for changes via conditional requests like If-None-Match.

Response Control Headers

Headers for controlling and include Vary, which lists request header fields that influenced the response selection (e.g., Vary: Accept-Language, Accept-Encoding). It instructs caches to vary stored responses based on these factors, preventing incorrect content delivery. The WWW-Authenticate header challenges the client to provide credentials for the protected resource, specifying schemes and parameters (e.g., WWW-Authenticate: Basic [realm](/page/Realm)="Secure Area"). It is required in 401 (Unauthorized) responses to initiate authentication flows.

Caching and State Management Examples

The Cache-Control response header directs caching behavior with directives like max-age, which sets the response's freshness lifetime in seconds (e.g., Cache-Control: max-age=3600 for one hour). This allows servers to override default expiration heuristics, balancing performance and data staleness. For maintaining state in stateless HTTP, the Set-Cookie header instructs the client to store a with a name-value pair and attributes like expiration or domain (e.g., Set-Cookie: sessionId=abc123; Max-Age=3600; Secure). It enables session tracking by having the client return the cookie in subsequent requests via the Cookie header. Introduced in 2012, the Strict-Transport-Security (HSTS) header enforces -only access for the host, with a required max-age directive specifying policy duration in seconds (e.g., Strict-Transport-Security: max-age=31536000; includeSubDomains). It mitigates man-in-the-middle attacks by directing browsers to reject insecure connections and upgrade HTTP requests to .

Authentication and Security

Authentication schemes

HTTP employs a challenge-response framework to control access to protected resources, where servers issue challenges via specific response headers and clients respond with credentials in request headers. This , defined in RFC 7235, supports multiple extensible authentication schemes, allowing servers to specify the required method and parameters. Challenges are typically issued in response to unauthorized access attempts, prompting clients to authenticate before retrying the request. The authentication scheme transmits user credentials as a -encoded string of the username and password separated by a colon, placed in the header. For example, a client might send Authorization: [Basic](/page/Basic) dXNlcm5hbWU6cGFzc3dvcmQ=, where the encoded value represents "username:". This scheme is simple but inherently insecure over unencrypted connections, as the encoding provides no confidentiality or integrity protection, exposing credentials to interception. A client SHOULD NOT send credentials over unencrypted HTTP; instead, it must be used with TLS to mitigate risks like and credential theft. In contrast, the Digest authentication scheme enhances security by using a challenge-response that avoids transmitting passwords. The issues a including a unique (a server-generated string to prevent replay attacks) and a , and the client computes a cryptographic —typically or SHA-256—of the username, password, , HTTP method, and request to produce the response value. This hashed digest is sent in the header, such as Authorization: Digest username="user", realm="example", [nonce](/page/Nonce)="7ypf/xlj9XXwfDPEoM4URrv/xwf94BcCAzFZH4GiTo0v", uri="/dir/index.html", response="dc509ac6f0e95b96b3e34b6e7d4197f5". By storing only the hashed form of credentials (e.g., HA1 = (username::password)), can verify without retaining passwords. Realms define protection spaces within the , partitioning resources into logical areas where the same credentials apply, such as "admin" for administrative paths or "[email protected]" for user-specific sections. The parameter in challenge headers (e.g., WWW-Authenticate: [Basic](/page/Basic) realm="Access to the staging site") indicates the scope, helping clients and users select appropriate credentials without affecting the scheme itself. Multiple realms can coexist on a single host, enabling fine-grained . Servers signal the need for authentication using 401 Unauthorized or 407 Proxy Authentication Required status codes, accompanied by WWW-Authenticate (for servers) or Proxy-Authenticate (for ) headers that list supported schemes and parameters. For instance, a 401 response might include WWW-Authenticate: [Basic](/page/Basic) realm="secure area", Digest realm="secure area", [nonce](/page/Nonce)="abc123", allowing the client to choose a compatible scheme. These headers must appear in the specified responses to guide the process. Advanced schemes build on this framework for modern applications. The Bearer scheme, commonly used with 2.0, conveys access tokens in the header as Authorization: Bearer mF_9.B5f-4.1JqM, where the token grants scoped access without further proof of possession. Resource servers validate the token against an authorization server, but transmission requires TLS to prevent unauthorized use. Mutual TLS (mTLS) extends authentication by leveraging client certificates during the TLS handshake for OAuth contexts, binding access tokens to the presented certificate's subject (e.g., DN or ) to ensure the token cannot be misused by unauthorized parties. In the PKI method, the server verifies the client's certificate chain and matches it to registered metadata like tls_client_auth_subject_dn. Use of Basic authentication over plain HTTP has been discouraged since the mid-2010s due to its vulnerability to man-in-the-middle attacks, with best practices mandating for any credential transmission.

Encryption and HTTPS integration

HTTPS (Hypertext Transfer Protocol Secure) is the secure variant of HTTP, which runs HTTP over Transport Layer Security (TLS) to provide confidentiality, integrity, and authenticity for data in transit. It typically operates on TCP port 443, distinguishing it from unencrypted HTTP on port 80, and ensures that sensitive information, such as login credentials or financial data, remains protected from unauthorized access during transmission. The integration of TLS into HTTP begins with the TLS handshake, a process that establishes a secure channel before any HTTP messages are exchanged. During the handshake, the client initiates with a ClientHello message, specifying supported TLS versions, cipher suites, and extensions; the server responds with a ServerHello, selecting parameters, followed by its digital certificate for authentication. Key exchange then occurs, often using ephemeral methods like Elliptic Curve Diffie-Hellman Ephemeral (ECDHE) to generate session keys without reusing long-term secrets, enabling forward secrecy. Certificate validation by the client verifies the server's identity against trusted certificate authorities, preventing impersonation. HTTP versions interact with TLS in protocol-specific ways to enable . For HTTP/1.1, TLS is applied directly atop the connection after the , with no additional required beyond standard TLS setup. HTTP/2 mandates TLS usage in most deployments and relies on (ALPN), a TLS extension where the client advertises "" in the ClientHello to signal support, allowing the server to confirm compatibility during the . In HTTP/3, TLS is embedded within the protocol, integrating messages into QUIC's connection establishment over for reduced latency, while still providing the same security guarantees. To enforce HTTPS usage and mitigate risks from HTTP downgrades, HTTP Strict Transport Security (HSTS) allows servers to send a Strict-Transport-Security header in HTTPS responses, instructing clients to interact only over secure connections for a specified duration. Browsers may also preload HSTS policies for popular sites, automatically redirecting HTTP requests to HTTPS without user intervention. By November 2025, TLS 1.3 has become the de facto standard for HTTPS, with compliance frameworks like PCI DSS 4.0 requiring at least TLS 1.2 (prohibiting vulnerable versions such as TLS 1.0 and 1.1) and organizational policies increasingly mandating TLS 1.3 where feasible. U.S. federal executive orders further require government agencies to support TLS 1.3 as soon as practicable, with mandatory implementation by 2030. Emerging post-quantum cryptography considerations are influencing TLS implementations, with hybrid key exchanges incorporating NIST-approved algorithms like ML-KEM to prepare for quantum threats, though full adoption remains in early stages. This encryption layer mitigates key attacks including man-in-the-middle interception, where an attacker could otherwise eavesdrop or alter traffic, and replay attacks through TLS's integrity protections and sequence numbering.

Optimizations and Extensions

Caching and content negotiation

HTTP employs caching mechanisms to store copies of responses on intermediaries or clients, reducing latency and bandwidth usage by serving fresh or revalidated content without full retrieval from the origin server. Caching operates through directives that specify storage rules and validators that enable efficient freshness checks, allowing caches to determine if a stored response remains valid. These features apply across HTTP versions, with intermediaries like proxies distinguishing between shared caches serving multiple users and private caches dedicated to individuals. Caching directives control how and for how long responses may be stored and reused. The primary directive, Cache-Control, appears in both requests and responses to convey instructions such as max-age for specifying freshness lifetime in seconds, no-cache to require revalidation before reuse, and no-store to prohibit storage entirely. The public directive permits storage in shared caches, while private restricts it to private caches only, preventing sensitive data from being shared across users. Legacy directives include Expires, which sets an absolute expiration date for responses in HTTP date format, though it is overridden by Cache-Control: max-age if present. The Pragma header, a holdover from HTTP/1.0, primarily uses no-cache for backward compatibility but lacks the precision of modern Cache-Control. Validators facilitate conditional requests to check resource changes without transferring the full body, enabling 304 (Not Modified) responses. The header provides an opaque entity tag—a string identifier for the resource version—while Last-Modified supplies a of the last update. Clients include these in request headers like If-None-Match (comparing ETags) or If-Modified-Since (comparing timestamps); if the resource matches the validator, the server responds with 304, confirming the cached copy's validity. ETags support weak validation (prefixed with "W/") for semantically equivalent content, whereas timestamps assume monotonic clock behavior but risk precision loss in distributed systems. Content negotiation allows servers to select the most appropriate representation of a based on client preferences, optimizing delivery for capabilities or settings. In proactive negotiation, the client sends Accept to list preferred media types (e.g., text/html;q=1.0, application/json;q=0.8), Accept-Language for languages (e.g., en;q=1.0, fr;q=0.9), and Accept-Encoding for codings (e.g., gzip). The server ranks variants using quality values (q-factors from 0 to 1) and specificity, selecting the best match; if none fits, it may return 406 (Not Acceptable). This process ensures tailored responses, such as language-specific pages or compressed payloads, without client-side parsing of alternatives. Proxies and other intermediaries enhance caching efficiency but require careful variant handling to avoid serving incorrect content. Shared caches, such as those in content delivery networks (CDNs), store responses for reuse across to scale distribution, while private caches like storage serve only the requesting for personalized or secure content. The Vary response header lists request headers (e.g., Vary: Accept-Language) that influence selection, keying cache entries to ensure distinct are stored separately and preventing cross- mismatches. Without Vary, caches might erroneously reuse a , leading to incorrect deliveries in negotiated scenarios. RFC 9111 (2022) consolidated and clarified HTTP caching semantics from prior specifications, introducing precise rules for staleness (when response age exceeds freshness lifetime) and revalidation via conditional requests. It deprecated the Warning header, shifting status details to Age for elapsed time since generation, and added the must-understand directive to enforce comprehension of unknown cache instructions, improving interoperability in diverse deployments. These updates address ambiguities in freshness calculations and intermediary behavior, ensuring robust caching in modern HTTP/2 and HTTP/3 environments.

Compression and multiplexing

HTTP employs compression techniques to reduce the size of transferred data, thereby improving efficiency over networks with limited bandwidth. Content compression is signaled through the Content-Encoding response header, which indicates the encoding applied to the payload body, such as , , or . Clients specify supported encodings via the Accept-Encoding request header, enabling servers to select an appropriate method during ; common values include "gzip" for the gzip format defined in 1952, "deflate" for zlib-compressed data per 1950 and 1951, and "br" for Brotli as specified in 7932. These methods apply lossless algorithms to the message body, excluding headers, and require the client to decompress the content to access the original representation. In , header compression is addressed separately through HPACK, a specialized format designed to eliminate redundancy in HTTP header fields while mitigating compression oracle attacks like . HPACK maintains a static table of 61 common header entries (e.g., ":method: GET" at index 2) and a dynamic table that stores frequently occurring fields, allowing headers to be represented via compact indices or literals with optional for further size reduction. This approach reduces header overhead significantly compared to uncompressed HTTP/1.1, where repetitive fields like "user-agent" or "accept" contribute substantial bytes per request. HTTP/3 uses QPACK (RFC 9204, 2022) for header compression, adapted to QUIC's stream-based . Unlike HPACK, which operates on a single connection and can introduce if a stream is blocked, QPACK encodes headers using instructions sent on dedicated encoder and decoder streams. It employs a similar static Huffman table and dynamic table for indexing common fields but blocks certain updates to prevent dependencies between independent streams, ensuring compression efficiency without blocking. Multiplexing enables multiple concurrent request-response exchanges over a single connection, addressing limitations in earlier HTTP versions. In , this is achieved through independent streams—bidirectional sequences of frames identified by unique 31-bit identifiers—allowing frames from different streams to be interleaved without blocking. Unlike HTTP/1.1 pipelining, which suffered from head-of-line (HOL) blocking where a delayed response stalled subsequent ones due to sequential processing, streams progress independently, eliminating application-level HOL blocking. HTTP/3 extends this capability via , using stream-based where each HTTP request-response pair occupies a dedicated QUIC stream, supporting up to 2^62-1 streams and isolating blocking to individual streams without affecting others. HTTP/2 and later versions introduce server push, allowing servers to proactively send resources anticipated by the client, such as CSS files or images linked in an response. This is initiated via the PUSH_PROMISE frame, which reserves a identifier and includes the promised request headers, followed by the pushed response on that . For example, upon receiving a GET request for an document, the server may push associated stylesheets, reducing round-trip times. supports push similarly using unidirectional of type 0x01. While and multiplexing enhance performance, they introduce trade-offs. impose CPU overhead on both servers (during encoding) and clients (during decoding), potentially increasing on resource-constrained devices despite savings. In contrast, HTTP/1.1 pipelining's HOL blocking often led to inefficient resource utilization, as a single slow response could delay an entire queue, prompting the shift to in later versions.

Examples

HTTP/1.1 transaction

A typical HTTP/1.1 involves a client initiating a request to retrieve a resource, such as an page, from a , followed by the server's response containing the requested or . This exchange uses messages over a connection, with the request specifying the method (e.g., GET), target , and version, along with optional headers. Consider a scenario where a client requests the root page from . The client sends the following request message, including the mandatory header to identify the target server:
GET / HTTP/1.1
Host: [example.com](/page/Example.com)
Accept: text/[html](/page/HTML)
This request line indicates a GET method for the root path ("/"), using HTTP/1.1, followed by headers specifying the host and acceptable content types. The empty line (CRLF) after the headers signals the end of the header section, with no message body for a simple GET. Upon receiving the request, the server processes it and responds with a status message if successful. For an unmodified resource, the server might return a 200 OK response with the HTML content, including headers for content type, length, and date:
HTTP/1.1 200 OK
Date: Mon, 08 Nov 2025 12:00:00 GMT
Server: ExampleServer/1.0
Content-Type: text/html
Content-Length: 123

<!DOCTYPE html>
<html>
<head><title>Example</title></head>
<body><h1>Hello, HTTP/1.1!</h1></body>
</html>
The status line confirms success (200 OK), while headers provide metadata about the response, and the body delivers the HTML. The Content-Length header ensures the client knows when the body ends. A common variation is a conditional GET request, where the client includes an If-Modified-Since header to check for updates since a known date, avoiding unnecessary data transfer if the resource is unchanged. The client request would be:
GET / HTTP/1.1
Host: example.com
If-Modified-Since: Mon, 01 Nov 2025 00:00:00 GMT
If the resource has not changed, the server responds with a 304 Not Modified status, omitting the body to save bandwidth:
HTTP/1.1 304 Not Modified
Date: Mon, 08 Nov 2025 12:00:00 GMT
This allows the client to use its cached version. Such transactions can be tested using tools like , which sends HTTP/1.1 requests by default over HTTP. For the basic GET example, the command is curl -v http://[example.com](/page/Example.com)/, where -v enables verbose output to display the raw request and response. For the conditional variation, use curl -v -H "If-Modified-Since: Mon, 01 Nov 2025 00:00:00 GMT" http://[example.com](/page/Example.com)/.

HTTP/2 and HTTP/3 differences in practice

In HTTP/2, a typical multiplexed transaction for multiple GET requests utilizes binary-framed messages over TCP, enabling concurrent streams without blocking. For instance, a client might initiate two parallel requests to fetch resources: the first stream (ID 1) sends a HEADERS frame containing compressed method, path, and authority details via HPACK, followed by a DATA frame for the response body if needed; the second stream (ID 3, odd IDs for client-initiated streams) follows similarly, with frames interleaved across the connection to avoid head-of-line (HOL) blocking at the application layer. This framing allows efficient resource utilization, as seen in simulations using nghttp2, where header compression reduces redundancy— for example, repeating fields like ":method: GET" are indexed and referenced rather than resent. HTTP/3 builds on this by mapping frames to packets over , integrating transport and security layers for lower latency. In a practical example, a resumed uses 0-RTT packets to send initial HTTP/3 HEADERS frames (e.g., for a GET /index.) without a full , carried in QUIC's frames within encrypted packets identified by connection IDs (CIDs) that persist across changes. Subsequent frames for the response are multiplexed on independent QUIC streams, avoiding TCP's packet-level HOL blocking since lost packets affect only their stream. Key practical differences arise from their transport layers: HTTP/2 relies on , where a single triggers retransmission delays across the entire connection, exacerbating HOL blocking in lossy networks; HTTP/3's , however, multiplexes streams natively and encrypts all packets by default with TLS 1.3 integrated, enabling faster recovery and seamless connection migration via CIDs—ideal for mobile handoffs. Tools like facilitate analysis of these, decoding HTTP/2 frames from TCP payloads or QUIC packets (with decryption keys), while nghttp2 simulates transactions for testing multiplexing efficiency. In mobile environments, these enhancements yield measurable latency reductions; for example, studies indicate achieves 12.4% faster on average compared to , with up to 20% shorter page load times under high-latency conditions (e.g., 200 ms RTT), due to QUIC's 0-RTT resumption and loss tolerance. 's header compression via HPACK remains a shared efficiency, but QUIC's stream isolation amplifies gains in variable networks.

Comparisons

With similar protocols

HTTP distinguishes itself from other application-layer protocols through its stateless request-response model optimized for distributed hypermedia systems, yet it shares foundational elements like header-based metadata and URI addressing with analogs in , , and real-time communication. These comparisons highlight HTTP's web-centric design versus more specialized or constrained alternatives. The (FTP), defined in 959, focuses on efficient bulk file transfers between hosts using stateful sessions that maintain connection context across commands. Unlike HTTP's stateless nature, where each request is independent and typically uses a single connection for both control and data, FTP employs separate control (port 21) and data (port 20) channels, supporting transfer modes like binary or ASCII to handle diverse file types. This statefulness enables directory navigation and resumable transfers but requires dedicated clients, making FTP less integrated into web browsers and ecosystems compared to HTTP's seamless embedding in hypertext retrieval. The (SMTP), outlined in 5321, enables relay through a push-oriented model where servers proactively forward messages between domains, contrasting HTTP's pull-based client requests. Both protocols draw from the (MIME) framework in RFC 2045 for structuring payloads, including support for multipart bodies, attachments, and content types, though HTTP modifies MIME entity rules for web efficiency, such as chunked transfers absent in SMTP. SMTP operates on port 25 with simple command-response exchanges similar to HTTP methods, but its focus remains on asynchronous mail delivery rather than on-demand resource access. WebSocket, specified in RFC 6455, extends HTTP by initiating a protocol upgrade through a client GET request containing Upgrade: websocket and Connection: Upgrade headers, to which the server responds with status code 101 (Switching Protocols). This handshake transforms the connection into a full-duplex channel for bidirectional, low-latency data flow, diverging from HTTP's unidirectional request-response cycle that necessitates polling for updates. Post-upgrade, WebSocket employs framed messages over the persistent link, ideal for real-time use cases like collaborative editing or live notifications, while reusing HTTP's /443 infrastructure without HTTP's repeated connection overhead. gRPC utilizes for transport, multiplexing multiple RPC calls over a single connection, but replaces HTTP's text-oriented payloads—commonly in APIs—with compact serialized from service definitions in .proto files. This structured approach enforces typed contracts for requests and responses, enabling efficient unary, server-streaming, client-streaming, and bidirectional operations, unlike HTTP's more flexible, human-readable method for general web interactions. Developed for high-performance distributed systems, gRPC's encoding reduces and compared to HTTP's verbose formats, particularly in environments. The (CoAP), detailed in 7252, acts as a UDP-based lightweight analog to HTTP for () applications in resource-limited settings, such as low-power sensors with intermittent connectivity. It adopts HTTP-like methods (GET, POST, PUT, DELETE) and a RESTful resource model addressed by URIs, but operates over (default port 5683) to minimize header overhead and support multicast, with optional reliability via confirmable messages rather than TCP's guaranteed delivery. Designed for constrained-node networks like , CoAP includes features for discovery and proxying to HTTP, facilitating between devices and the web while avoiding HTTP's higher resource demands.

Version evolution summary

The evolution of HTTP has progressed through several versions, each addressing limitations in performance, efficiency, and reliability while maintaining where possible. HTTP/1.1 established the foundational text-based protocol over , enabling persistent connections but suffering from . Subsequent versions introduced binary framing and in , still over , and shifted to over in for reduced and better handling of network changes. The following table summarizes key aspects of these versions.
VersionTransportFramingKey FeaturesLimitationsAdoption (2025)
HTTP/1.1TextPersistent connections, pipelining, at , inefficient for multiple resources~9% of traffic ( share, down from higher historical usage due to upgrades)
HTTP/2BinaryMultiplexing of requests over single connection, HPACK header compression, server pushInherits , dependency on for congestion control~60% of traffic, widely supported but declining relatively as grows
HTTP/3/Binary0-RTT handshakes, connection migration across networks, integrated TLS 1.3 encryption, multiplexed streams without HOL blockingPotential blocking by firewalls restricting , higher initial implementation complexity~30% of traffic ( share); growing rapidly but requires fallbacks to for compatibility
Performance improvements in later versions include notable latency reductions; for instance, can achieve up to 12.4% lower page load times compared to in real-world tests, particularly beneficial in high-latency or lossy networks. Adoption often involves fallback mechanisms, where browsers negotiate the highest supported version via ALPN during TLS handshakes. Looking ahead, the HTTP Working Group focuses on incremental extensions such as improved caching semantics and privacy enhancements rather than a major HTTP/4 release, as 's foundation addresses core transport challenges effectively.

References

  1. [1]
    RFC 9110: HTTP Semantics
    The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems.RFC 9112 · RFC 9111 · RFC 3864: Registration... · Info page
  2. [2]
    HTTP: Hypertext Transfer Protocol - MDN Web Docs
    Jul 4, 2025 · HTTP was created in the early 1990s and has been extended several times. This article goes through its history and describes HTTP/0.9, HTTP/1.0, ...Evolution of HTTP · Overview · Request methods · HTTP headers
  3. [3]
  4. [4]
    Evolution of HTTP - MDN Web Docs
    HTTP (HyperText Transfer Protocol) is the underlying protocol of the World Wide Web. Developed by Tim Berners-Lee and his team between 1989-1991.
  5. [5]
    RFC 1945 - Hypertext Transfer Protocol -- HTTP/1.0 - IETF Datatracker
    The Hypertext Transfer Protocol (HTTP) is an application-level protocol with the lightness and speed necessary for distributed, collaborative, hypermedia ...<|control11|><|separator|>
  6. [6]
  7. [7]
  8. [8]
  9. [9]
  10. [10]
  11. [11]
  12. [12]
  13. [13]
  14. [14]
  15. [15]
    Overview of HTTP - MDN Web Docs
    Jul 4, 2025 · HTTP is a protocol for fetching resources such as HTML documents. It is the foundation of any data exchange on the Web and it is a client-server protocol.Evolution of HTTP · HTTP/2 · TCP · ProtocolMissing: IoT | Show results with:IoT
  16. [16]
    IoT Is Eating the World: APIs and REST
    Since REST uses HTTP, any device which can connect to the web and request a web page can use a REST API. REST is a good model for IoT because each device can ...
  17. [17]
    APIs in IoT: Connecting Devices - API7.ai
    Aug 8, 2025 · APIs enable communication between diverse IoT devices, acting as bridges for data exchange and enabling interoperability and scalability.
  18. [18]
    SSL Stats for Secure Browsing in 2025 - SerpWatch
    Jan 3, 2022 · More than 46 million websites use SSL by Default in 2025. There are three primary types of SSL certificates. 95% of websites on Google use HTTPS ...<|separator|>
  19. [19]
    Usage Statistics of HTTP/3 for Websites, November 2025 - W3Techs
    HTTP/3 is used by 35.9% of all the websites. Historical trend. This diagram shows the historical trend in the percentage of websites using HTTP/3. Our dedicated ...Missing: Archive | Show results with:Archive
  20. [20]
    What is a content delivery network (CDN)? | How do CDNs work?
    A CDN allows for the quick transfer of assets needed for loading Internet content, including HTML pages, JavaScript files, stylesheets, images, and videos.Missing: impact | Show results with:impact
  21. [21]
    CDN | 2024 | The Web Almanac by HTTP Archive
    Nov 11, 2024 · The trend for HTTP/2+ adoption in third-party domains follows the same as for HTML above. Compared to 2022, HTTP/2+ CDN usage increased from 88% ...
  22. [22]
    Microservices vs. Serverless: A Pragmatic Guide to Choosing ... - API7
    Jul 31, 2025 · Master microservices vs serverless trade-offs, cut infra costs, and deploy the right model—containers, Lambda, or both—via a single API ...
  23. [23]
    Serverless Computing in 2025: Key Trends, Use Cases & Challenges
    May 20, 2025 · Explore the top serverless computing trends in 2025. Discover use cases, challenges, examples, and why businesses prefer it.
  24. [24]
    [PDF] Information Management: A Proposal - CERN Document Server
    Mar 10, 1989 · Tim Berners-Lee, CERN. March 1989, May 1990. This proposal concerns the management of general information about accelerators and experiments at ...
  25. [25]
    The Original HTTP as defined in 1991 - W3C
    The Original HTTP as defined in 1991. This document defines the Hypertext Transfer protocol (HTTP) as originally implemented by the World Wide Web initaitive ...Missing: Berners- Lee<|control11|><|separator|>
  26. [26]
    RFC 2068 - Hypertext Transfer Protocol -- HTTP/1.1 - IETF Datatracker
    RFC 2068 HTTP/1.1 January 1997 Clients which assume persistent connections and pipeline immediately after connection establishment SHOULD be prepared to ...
  27. [27]
    RFC 2616 - Hypertext Transfer Protocol -- HTTP/1.1 - IETF Datatracker
    The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems.RFC 7230 · RFC 2068 · RFC 7235
  28. [28]
    RFC 9112 - HTTP/1.1
    This document specifies how HTTP semantics are conveyed using the HTTP/1.1 message syntax, framing, and connection management mechanisms.6.1. · 6.3. · 7.1. · 9.3.
  29. [29]
    HTTP (httpbis) - IETF Datatracker
    This Working Group is charged with maintaining and developing the "core" specifications for HTTP, and generic extensions to it.Missing: formation | Show results with:formation
  30. [30]
  31. [31]
  32. [32]
    RFC 7540 - Hypertext Transfer Protocol Version 2 (HTTP/2)
    This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review ...
  33. [33]
    Hello HTTP/2, Goodbye SPDY - Chromium Blog
    We plan to gradually roll out support for HTTP/2 in Chrome 40 in the upcoming weeks. HTTP/2's primary changes from HTTP/1.1 focus on improved performance.
  34. [34]
    http2 in Firefox
    Feb 1, 2021 · In all Firefox versions starting with version 36, released Februrary 24th 2015, http2 is enabled by default. ... One of them is “HTTP/2 and SPDY ...
  35. [35]
    Akamai Blog | HTTP/3 and QUIC: Past, Present, and Future
    Jun 21, 2021 · The IETF formed a QUIC working group in 2016. Their charter was to take Google's web-specific implementation and adapt it to be a general- ...
  36. [36]
    RFC 9114: HTTP/3
    This document defines HTTP/3: a mapping of HTTP semantics over the QUIC transport protocol, drawing heavily on the design of HTTP/2.HTTP/3 Protocol Overview · Expressing HTTP Semantics in... · HTTP Framing Layer
  37. [37]
    RFC 9114 - HTTP/3 - IETF Datatracker
    This document defines HTTP/3: a mapping of HTTP semantics over the QUIC transport protocol, drawing heavily on the design of HTTP/2.HTTP/3 Protocol Overview · Expressing HTTP Semantics in... · HTTP Framing Layer
  38. [38]
    📄 HTTP Documentation
    The “core” semantics of the HTTP protocol are defined by: RFC 9110: HTTP Semantics; RFC 9111: HTTP Caching. Those semantics are expressed “on the wire” in three ...HTTP Semantics · Cache-Control: immutable · Cache-Status Header FieldMissing: 2022 | Show results with:2022
  39. [39]
    Chrome is deploying HTTP/3 and IETF QUIC - Chromium Blog
    Oct 7, 2020 · We've found that IETF QUIC significantly outperforms HTTP over TLS 1.3 over TCP. In particular, Google search latency decreases by over 2%.<|separator|>
  40. [40]
    Cloudflare 2024 Year in Review
    Dec 9, 2024 · At a global level, 20.5% of requests in 2024 were made using HTTP/3. Another 29.9% of requests were made over the older HTTP/1.x versions, while ...Key Findings · Traffic Trends · Adoption & Usage Insights<|separator|>
  41. [41]
    The Challenges Ahead for HTTP/3 - Internet Society Pulse
    Jul 25, 2023 · As such, many vendors recommend disabling QUIC entirely for now, as browsers will automatically fall back to HTTP/2 over TCP in this case.
  42. [42]
    HTTP/3 in the Wild: Why It Beats HTTP/2 Where It Matters Most
    Jun 20, 2025 · Real-World Adoption: HTTP/3 Is Accelerating ; 2023, ~64%, ~28% ; 2024, ~50%, ~34% ; 2025 (est.) ~62.5%, ~41.5% ; 2026 (est.) ~52.5%, ~57.5% ...
  43. [43]
    RFC 6265 - HTTP State Management Mechanism - IETF Datatracker
    This document defines the HTTP Cookie and Set-Cookie header fields. These header fields can be used by HTTP servers to store state (called cookies) at HTTP ...
  44. [44]
  45. [45]
    RFC 9110 - HTTP Semantics - IETF Datatracker
    This document describes the overall architecture of HTTP, establishes common terminology, and defines aspects of the protocol that are shared by all versions.Missing: refactoring | Show results with:refactoring
  46. [46]
    RFC 7230 - Hypertext Transfer Protocol (HTTP/1.1) - IETF Datatracker
    The Hypertext Transfer Protocol (HTTP) is a stateless application- level protocol for distributed, collaborative, hypertext information systems.
  47. [47]
    RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1) - IETF Datatracker
    This document defines the semantics of HTTP/1.1 messages, as expressed by request methods, request header fields, response status codes, and response header ...RFC 7235 · RFC 7234 · RFC 7230 · RFC 9110
  48. [48]
    RFC 9112: HTTP/1.1
    The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems.
  49. [49]
    RFC 9113: HTTP/2
    This specification describes an optimized expression of the semantics of the Hypertext Transfer Protocol (HTTP), referred to as HTTP version 2 (HTTP/2).Missing: cycle | Show results with:cycle
  50. [50]
  51. [51]
  52. [52]
  53. [53]
  54. [54]
  55. [55]
  56. [56]
  57. [57]
  58. [58]
  59. [59]
  60. [60]
  61. [61]
  62. [62]
  63. [63]
  64. [64]
  65. [65]
  66. [66]
  67. [67]
    RFC 5789 - PATCH Method for HTTP - IETF Datatracker
    This specification defines the new HTTP/1.1 [RFC2616] method, PATCH, which is used to apply partial modifications to a resource.
  68. [68]
    Hypertext Transfer Protocol (HTTP) Field Name Registry
    Oct 1, 2021 · New field names, along with changes to existing ones, can be requested using the [registry interface] or the mailing list defined in [RFC9110].
  69. [69]
    RFC 7541 - HPACK: Header Compression for HTTP/2
    This specification defines HPACK, a compression format for efficiently representing HTTP header fields, to be used in HTTP/2.
  70. [70]
  71. [71]
  72. [72]
  73. [73]
  74. [74]
  75. [75]
  76. [76]
  77. [77]
  78. [78]
  79. [79]
  80. [80]
  81. [81]
  82. [82]
  83. [83]
  84. [84]
  85. [85]
  86. [86]
  87. [87]
  88. [88]
  89. [89]
  90. [90]
  91. [91]
  92. [92]
  93. [93]
  94. [94]
  95. [95]
  96. [96]
  97. [97]
  98. [98]
  99. [99]
  100. [100]
  101. [101]
    RFC 7235 - Hypertext Transfer Protocol (HTTP/1.1): Authentication
    The Hypertext Transfer Protocol (HTTP) is a stateless application- level protocol for distributed, collaborative, hypermedia information systems.
  102. [102]
    RFC 7617 - The 'Basic' HTTP Authentication Scheme
    This document defines the "Basic" Hypertext Transfer Protocol (HTTP) authentication scheme, which transmits credentials as user-id/ password pairs, encoded ...
  103. [103]
  104. [104]
    RFC 7616 - HTTP Digest Access Authentication - IETF Datatracker
    This document defines the HTTP Digest Authentication scheme that can be used with the HTTP authentication mechanism.<|control11|><|separator|>
  105. [105]
  106. [106]
  107. [107]
  108. [108]
  109. [109]
  110. [110]
  111. [111]
  112. [112]
  113. [113]
  114. [114]
    OWASP Testing for Weak SSL TLS Ciphers Insufficient Transport
    The application should not transmit sensitive information via unencrypted channels. Typically it is possible to find basic authentication over HTTP, input ...
  115. [115]
    RFC 8446 - The Transport Layer Security (TLS) Protocol Version 1.3
    This document specifies version 1.3 of the Transport Layer Security (TLS) protocol. TLS allows client/server applications to communicate over the Internet.
  116. [116]
    RFC 7301 - Transport Layer Security (TLS) - IETF Datatracker
    This document describes a Transport Layer Security (TLS) extension for application-layer protocol negotiation within the TLS handshake.
  117. [117]
    RFC 9001 - Using TLS to Secure QUIC - IETF Datatracker
    This associated state is used for deciding whether 0-RTT data must be rejected. For example, HTTP/3 settings [QUIC-HTTP] determine how 0-RTT data from the ...
  118. [118]
  119. [119]
    RFC 9111: HTTP Caching
    ### Summary of RFC 9111 - HTTP Caching (Sections on Caching Directives, Validators, Proxies/Caches, and Updates)
  120. [120]
  121. [121]
  122. [122]
  123. [123]
  124. [124]
  125. [125]
  126. [126]
  127. [127]
  128. [128]
  129. [129]
  130. [130]
  131. [131]
  132. [132]
  133. [133]
  134. [134]
  135. [135]
  136. [136]
  137. [137]
  138. [138]
  139. [139]
    RFC 7932 - Brotli Compressed Data Format - IETF Datatracker
    RFC 7932 defines a lossless compressed data format using LZ77 and Huffman coding, with high compression ratio and fast decompression, independent of system.
  140. [140]
  141. [141]
  142. [142]
  143. [143]
  144. [144]
  145. [145]
  146. [146]
  147. [147]
  148. [148]
  149. [149]
    RFC 9112 - HTTP/1.1 - IETF Datatracker
    The chunked transfer coding wraps content in order to transfer it as a series of chunks, each with its own size indicator, followed by an · A recipient ...Table of Contents · Message Body · Transfer Codings · Connection Management
  150. [150]
  151. [151]
  152. [152]
  153. [153]
  154. [154]
  155. [155]
  156. [156]
  157. [157]
  158. [158]
  159. [159]
  160. [160]
    RFC 7541 - HPACK: Header Compression for HTTP/2
    This specification defines HPACK, a compression format for efficiently representing HTTP header fields, to be used in HTTP/2.
  161. [161]
    HTTP/2 C Library — nghttp2 1.69.0-DEV documentation
    nghttpx is a multi-threaded reverse proxy for HTTP/3, HTTP/2, and HTTP/1.1, and powers http://nghttp2.org and supports HTTP/2 server push. We reworked nghttpx ...Missing: Wireshark | Show results with:Wireshark
  162. [162]
    RFC 9000: QUIC: A UDP-Based Multiplexed and Secure Transport
    QUIC is a secure, general-purpose transport protocol providing flow-controlled streams, low-latency connection, and network path migration, using UDP.
  163. [163]
    RFC 9001: Using TLS to Secure QUIC
    QUIC uses 0-RTT packets to carry early data. ... A server MUST treat receipt of a CRYPTO frame in a 0-RTT packet as a connection error of type PROTOCOL_VIOLATION.
  164. [164]
  165. [165]
  166. [166]
  167. [167]
  168. [168]
    Comparing HTTP/3 vs. HTTP/2 Performance - The Cloudflare Blog
    Apr 14, 2020 · On average, with HTTP/3 we see the first byte appearing after 176ms. With HTTP/2 we see 201ms, meaning HTTP/3 is already performing 12.4% better ...Missing: 10-20% | Show results with:10-20%
  169. [169]
    [PDF] Measuring HTTP/3: Adoption and Performance - arXiv
    Nov 10, 2021 · Figure 6 shows that HTTP/1.1 has the worst performance with high latency, while HTTP/3 shows the greatest benefits. Considering additional ...
  170. [170]
    RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One
    This set of documents, collectively called the Multipurpose Internet Mail Extensions, or MIME, redefines the format of messages.Missing: comparison similarities
  171. [171]
    RFC 6455 - The WebSocket Protocol - IETF Datatracker
    The WebSocket Protocol enables two-way communication between a client and a remote host, using a handshake and message framing over TCP, avoiding multiple HTTP ...
  172. [172]
    Introduction to gRPC
    Nov 12, 2024 · This page introduces you to gRPC and protocol buffers. gRPC can use protocol buffers as both its Interface Definition Language (IDL) and as ...
  173. [173]
    Core concepts, architecture and lifecycle - gRPC
    Nov 12, 2024 · Starting from a service definition in a .proto file, gRPC provides protocol buffer compiler plugins that generate client- and server-side code.
  174. [174]
    RFC 7252 - The Constrained Application Protocol (CoAP)
    CoAP is a web transfer protocol for constrained nodes and networks, designed for machine-to-machine applications, and optimized for M2M applications.
  175. [175]
    HTTP | 2024 | The Web Almanac by HTTP Archive
    Dec 10, 2024 · Indeed, as we'll see later, in reality HTTP/3 support across the web is closer to 30% instead of the 7-9% reported above.Missing: rate | Show results with:rate
  176. [176]
    Usage Statistics of HTTP/2 for Websites, November 2025 - W3Techs
    HTTP/2 is used by 33.3% of all the websites. Historical trend. This diagram shows the historical trend in the percentage of websites using HTTP/2. Our dedicated ...
  177. [177]
    Examining HTTP/3 usage one year on - The Cloudflare Blog
    Jun 6, 2023 · Support for HTTP/3 is on by default for zones using Cloudflare's free tier of service, while paid customers have the option to activate support.
  178. [178]
    IETF HTTP Working Group
    The IETF HTTP Working Group maintains and develops the Hypertext Transfer Protocol - the core protocol of the World Wide Web.Missing: 1992 | Show results with:1992