HTTP stands for Hypertext Transfer Protocol. It is a communications protocol that facilitates the transfer of information on the Internet. It is a request-response protocol between clients and servers. Clients are web users or web browsers, while the responding server that stores or creates the resources requested, is known as the origin server. HTTP can be implemented on any of the Internet protocols. However, the TCP/IP protocol suite is most popularly used.
An HTTP client establishes a TCP connection with the host. Port 80 is the default port used for this connection. On receiving the request, the server replies with a status line, a message, and the requested resource. A series of request and response transactions over the network is known as an HTTP session.
Appearing at the beginning of every web page address, HTTP defines the standard mechanism for the exchange of application-level messages between devices on the web. All the web services run over this protocol. When a URL in entered in the address bar of a browser, an HTTP command to fetch the requested resource is sent to the HTTP server. It is the URL that identifies and locates HTTP resources on the server.
HTTP: A stateless Protocol
In HTTP, each request is treated as an independent transaction. Requests are processed without the knowledge of previous ones and the communication consists of independent request and response pairs. The server does not have to retain session information. This makes HTTP a stateless protocol. As in case of any stateless protocol, the advantage of HTTP is that the server design is simple. A connection is closed quickly, which is to say, the server does not have to maintain the connection if the client leaves the page. But the disadvantage with HTTP and other stateless protocols is that requests carry additional information which the server has to interpret.
Connections for Resource Request
In HTTP/1.0, a separate connection needs to be made for each resource request. With HTTP/1.1, a connection can be reused to download files, images, or different elements of a web page after it has been delivered. Thus, the response time is reduced.
HTTPS or HTTP Secure enables secure communication over the network. It is a variation of HTTP, wherein the browser adds an encryption layer to protect the Internet traffic. HTTP is layered over SSL or TLS protocols. It allows for authentication of the websites and maintains privacy and integrity of the data being exchanged. It provides a secure channel of communication, and is often used for purposes like making online payments. The default port of HTTPS is 443. Messages sent using this protocol are encrypted, thus allowing no third party to read or use them. The syntax is identical to that of HTTP. Just that the URL specified starts with 'https' instead of the usual 'http'.
The World Wide Web Consortium and the Internet Engineering Task Force worked towards the development of HTTP. This protocol is used for the retrieval of interlinked text documents hosted by the web and for accessing resources over the web using uniform resource locators. You should visit this article on Hypertext Transfer Protocol to know how the protocol works.