Hypertext Transfer Protocol (HTTP) est un protocole de la couche application servant à transmettre des documents hypermedia, comme HTML. Il a été conçu pour communiquer entre les navigateurs web et les serveurs web, bien qu'il puisse être utilisé à d'autres fins. Il suit le modèle classique client-serveur, avec un client qui ouvre une connexion, faire une requête et attends jusqu'à recevoir une réponse. C'est aussi un protocole sans état, ce qui signifie que le serveur ne converse aucune données (état) entre deux requêtes. Bien que généralement basé sur une couche TCP/IP, il peut aussi être utilisé sur toute couche de transport fiable,qui est un protocole qui ne perd pas de messages silencieusement.
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 aCookie
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 theimg
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: {{HTTPMethod("GET")}}, {{HTTPMethod("POST")}}, but also less common requests like {{HTTPMethod("OPTIONS")}}, {{HTTPMethod("DELETE")}} or {{HTTPMethod("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