Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Our volunteers haven't translated this article into Lingála yet. Join us and help get the job done!

Hypertext Transfer Protocol (HTTP) is an application-layer protocol for transmitting hypermedia documents, such as HTML. It was designed for communication between web browsers and web servers, though it can be used for other purposes as well. It follows a classical client-server model, with a client opening a connection, making a request, and waiting until it receives a response. It is also a stateless protocol, meaning that the server does not keep any data (state) between two requests. Though often based on a TCP/IP layer, it can be used on any reliable transport layer, that is a protocol that don't lose messages silently.

Tutorials

Learn how to use HTTP with guides and tutorials.

Overview of HTTP
Presents the basic features of the client-server protocol: what it can do and what its intended uses
Evolution of HTTP
A brief description of the changes that happened in HTTP from the early versions to the modern HTTP/2 and beyond.
HTTP Messages
Describes the type and structure of the different kind of messages of HTTP/1.x and HTTP/2.
A typical HTTP session
Shows and explains the flow of a usual HTTP session.
Connection management in HTTP/1.x
Describes the three connection management models available in HTTP/1.x, their strengths and their weaknesses.
HTTP Cache
Caching is a major tool for right performance Web sites. This article presents the different kind of cache and how to use HTTP Headers to configure and control them.
HTTP Cookies
How cookies work is defined by RFC 6265. On receiving an HTTP request, a server can send a Set-Cookie header with the response. Afterward, the client returns the cookie value with every request to the same server in the form of a Cookie HTTP header. Additionally, an expiration delay can be specified. The cookie can also be restricted to a specific domain and path.
HTTP Access Control (CORS)
Cross-site HTTP requests are HTTP requests for resources from a different domain other than the domain of the resource making the request. For instance, a resource loaded from Domain A (https://domaina.example/), such as an HTML web page, makes a request for a resource on Domain B (https://domainb.foo/), such as an image, using the img element (https://domainb.foo/image.jpg). This occurs very commonly on the web today — pages load many resources in a cross-site manner, including CSS stylesheets, images and scripts, and other resources.
Controlling DNS prefetching
Firefox and most other modern browsers perform DNS prefetching. This is when browsers proactively perform domain name resolution on links that the user may choose to follow and resources referenced by the document, such as images, CSS, and JavaScript. This prefetching is performed in the background so that the DNS lookup is likely to have already been resolved by the time the referenced items are requested. This reduces latency when, for example, the user clicks a link.

Reference

Browse through detailed HTTP reference documentation.

HTTP Headers
HTTP message headers are used to describe precisely the resource or the behavior of the server or the client. Custom proprietary headers can be added using the 'X-' prefix; others in an IANA registry, whose original content was defined in RFC 4229. IANA also maintains a registry of proposed new HTTP message headers.
HTTP Request Methods
The different operation that can be done with HTTP: GET, POST, but also less common requests like OPTIONS, DELETE or TRACE.
HTTP Status Response Codes
HTTP response codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes: informational responses, successful responses, redirections, client errors, and servers errors.

Tools & resources

Helpful tools for using and debugging your HTTP connections.

Firefox Developer Tools
Network monitor
RedBot
A tool to check your cache-related headers
How Browsers Work
A very comprehensive article on browsers internals & request flow through HTTP protocol. A MUST-READ article for any web developer.
 
 
 

Document Tags and Contributors

Tags: 
 Last updated by: fscholz,