Topic > How the Hypertext Transfer Protocol works

IndexBasic FeaturesBasic ArchitectureHTTP VersionUniform Resource IdentifiersDate/Time FormatsCharacter SetHTTP MessageHypertext Transfer Protocol (HTTP) is an application-level protocol. HTTP is used for collaborative, distributed and hypermedia information systems. This is the basis for data communication for the World Wide Web. HTTP is a generic, stateless protocol that can be used for other purposes, as well as using extensions of its request methods, error codes and headers. Say no to plagiarism. Get a tailor-made essay on "Why Violent Video Games Shouldn't Be Banned"? Get an original essayHTTP is a communication protocol based on TCP/IP. HTTP is used to deliver data such as HTML files and images, query results, sounds, videos, and other multimedia files over the WWW. The default port number for HTTP is 80 but we can use other port numbers as well. The development of HTTP was initiated by Tim Berners-Lee at CERN in 1989. The development of HTTP standards was coordinated by the Internet Engineering Task Force (IETF) and the World Wide Web Consortium (W3C), culminating in the publication of a series of Requests for Comments (RFC). The first definition of HTTP/1.1, the version of HTTP in common use, occurred in RFC 2068 in 1997, although this was made obsolete by RFC 2616 in 1999 and then again by RFC 7230 and family in 2014. A version later, the successor to HTTP /2.0, was standardized in 2015 and is now supported by major web servers. HTTP functions as a request-response protocol in the client-server computing model. For example, a web browser might be the client, and an application running on a computer hosting a website might be the server. The client sends an HTTP request message to the server. The server, which provides resources such as HTML files and other content or performs other functions on behalf of the client, returns a response message to the client. The response contains information about the completion status of the request and may also contain the requested content in the message body. HTTP is designed to allow intermediate network elements to enhance or enable communications between clients and servers. HTTP is an application layer protocol designed as part of the Internet protocol suite. HTTP resources are identified and located on the network by Uniform Resource Locators (URLs), using the http and https Uniform Resource Identifiers (URI) schemes. URIs and hyperlinks in HTML documents form interconnected hypertext documents. Basic Features There are three basic features that make HTTP a simple yet powerful protocol: HTTP is connectionless: HTTP client sends an HTTP request and after making a request, the client disconnects from the server and waits for a response from the server. The server processes the request and re-establishes the connection with the client to send a response. HTTP is media independent: it means that data of any type can be sent over HTTP as long as the client and server know how to handle the content of the data. The client and server must specify the content type using the appropriate MIME type. HTTP is stateless: HTTP is connectionless and is a direct result of HTTP being a stateless protocol. The server and client are aware of each other only during a current request. Afterwards, both of them forget about each other. Due to this nature of the protocol, neither the client nor the browser can retain information between different requests on web pages. Basic Architecture The following diagram shows a very simple architecture of a web application.