Jump to content

HTTP

Checked
Page protected with pending changes
From Wikipedia, the free encyclopedia
(Redirected from HTTP request)

HTTP
International standard
  • RFC 1945 HTTP/1.0
  • RFC 9110 HTTP Semantics
  • RFC 9111 HTTP Caching
  • RFC 9112 HTTP/1.1
  • RFC 9113 HTTP/2
  • RFC 7541 HTTP/2: HPACK Header Compression
  • RFC 8164 HTTP/2: Opportunistic Security for HTTP/2
  • RFC 8336 HTTP/2: The ORIGIN HTTP/2 Frame
  • RFC 8441 HTTP/2: Bootstrapping WebSockets with HTTP/2
  • RFC 9114 HTTP/3
  • RFC 9204 HTTP/3: QPACK: Field Compression
Developed byInitially CERN; IETF, W3C
Introduced1991; 35 years ago (1991)
Websitehttpwg.org/specs/

HTTP (Hypertext Transfer Protocol) is an application layer protocol in the Internet protocol suite for distributed, collaborative, hypermedia information systems.[1] HTTP is the foundation of data communication for the World Wide Web, where hypertext documents include hyperlinks to other resources that the user can easily access, for example by a mouse click or by tapping the screen in a web browser.

HTTP is a request–response protocol in the client–server model. A transaction starts with a client submitting a request to the server, the server attempts to satisfy the request and returns a response to the client that describes the disposition of the request and optionally contains a requested resource such as an HTML document or other content.

In a common scenario, a web browser acts as the client, and a web server, hosting one or more websites, is the server. A web browser is an example of a user agent (UA). Other types of user agent include the indexing software used by search providers (web crawlers), voice browsers, mobile apps, and other software that accesses, consumes, or displays web content.

HTTP is designed to permit intermediate network elements to improve or enable communications between clients and servers. High-traffic websites often benefit from web cache servers that deliver content on behalf of upstream servers to improve response time. Web browsers cache previously accessed web resources and reuse them, whenever possible, to reduce network traffic. HTTP proxy servers at private network boundaries can facilitate communication for clients without a globally routable address, by relaying messages with external servers.

To allow intermediate HTTP nodes (proxy servers, web caches, etc.) to accomplish their functions, some of the HTTP headers (found in HTTP requests/responses) are managed hop-by-hop whereas other HTTP headers are managed end-to-end (managed only by the source client and by the target web server).

A web resource is located by a uniform resource locator (URL), using the Uniform Resource Identifier (URI) schemes http and https. URIs are encoded as hyperlinks in HTML documents, so as to form interlinked hypertext documents.[2]

Versions

[edit]

The protocol has been revised over time. A version is identified as HTTP/# where # is the version number. This article covers aspects of all versions but provides primary coverage for HTTP/0.9, HTTP/1.0, and HTTP/1.1. Separate articles cover HTTP/2 and HTTP/3 in detail.

Version Introduced Status
0.9 1991 Obsolete
1.0 1996 Obsolete
1.1 1997 Standard
2 2015 Standard
3 2022 Standard

In HTTP/1.0, a separate TCP connection to the same server is made for every resource request.[3]:§1.3

In HTTP/1.1, instead a TCP connection can be reused to make multiple resource requests (i.e. of HTML pages, frames, images, scripts, stylesheets, etc.).[4]:§9.1,9.3 HTTP/1.1 communications therefore experience less latency as the establishment of TCP connections presents considerable overhead, especially under high traffic conditions.[5]

Enhancements added with HTTP/2 allow for less latency and, in most cases, higher speeds than HTTP/1.1 communications. HTTP/2 adds support for:

  • a compressed binary representation of metadata (HTTP headers) instead of a textual one, so that headers require much less space;
  • a single TCP/IP (usually encrypted) connection per accessed server domain instead of 2 to 8 TCP/IP connections;
  • one or more bidirectional streams per TCP/IP connection in which HTTP requests and responses are broken down and transmitted in small packets to almost solve the problem of the HOLB (head-of-line blocking);[note 1]
  • a push capability to allow server application to send data to clients whenever new data is available (without forcing clients to request periodically new data to server by using polling methods).[6]:§2

HTTP/3 uses QUIC + UDP transport protocols instead of TCP. Only the IP layer is used (which UDP, like TCP, builds on). This slightly improves the average speed of communications and avoids the occasional problem of TCP connection congestion that can temporarily block or slow down the data flow of all its streams (another form of "head of line blocking").

Use

[edit]

HTTP/2 is supported by 71% of websites[7][8] (34.1% HTTP/2 + 36.9% HTTP/3 with backwards compatibility) and supported by almost all web browsers (over 98% of users).[9] It is also supported by major web servers over Transport Layer Security (TLS) using an Application-Layer Protocol Negotiation (ALPN) extension[10] where TLS 1.2 or newer is required.[6]

HTTP/3 is used on 40% of websites[11] and is supported by most web browsers, i.e. (at least partially) supported by 97% of users.[12] HTTP/3 uses QUIC instead of TCP for the underlying transport protocol. Like HTTP/2, it does not obsolete previous major versions of the protocol. In 2019, support for HTTP/3 was first added to Cloudflare and Chrome[13][14] and also enabled in Firefox.[15] HTTP/3 has lower latency for real-world web pages and loads faster than HTTP/2, in some cases over three times faster than HTTP/1.1, which is still commonly the only protocol enabled.[16]

HTTPS, the secure variant of HTTP, is used by 90.1% of websites.[17]

Technology

[edit]

Transport layer

[