In this post I am going to discuss about Hypertext Transfer protocol (HTTP) and its working. We utilise HTTP to help manage communications on the internet.

Definition of HTTP :

HTTP is a protocol which defines how a web client requests the web pages from the web server and web server responds and transfers the web pages to the web client.

Web Server :

It is a computer system which stores the web pages. Web page is a HTML document stored in web servers. Websites are the collections of web pages. The basic function of web server is to host websites and the most widely used software in web server is Apache.

Web Client :

Definition of Web client is anything that uses the internet for example user wish to open Facebook from his browser by using internet. So, the device that uses the internet must interact with the web server by this we can say that any device that interact with web server is a web client.

What is HTTP?

HTTP stands for Hypertext Transfer Protocol where the protocol is for viewing the web pages on the internet. It is an application layer protocol which allows web-based application for transferring the data. It is the communication between client and server. For example, the URL which you enter in the web browser acts as a client and sends the HTTP command to the server which fetch the requested web page. HTTP uses TCP/IP protocol which means how data is transmitted from one place to another.
TCP is also used when requesting and responding and it is more reliable for transferring data. By default, HTTP uses port 80.

Working of HTTP

HTTP is a stateless protocol, that means it executes every single transaction independently which is not related to any other transaction which means here server does not remember the previous history.

History and Versions of HTTP :

Invention of HTTP is by Tim Berners-Lee and his team. Latest version of HTTP in the market is HTTP/2.0. There are four versions of HTTP

  • HTTP/0.9 released in the year 1991. It is the initial version of HTTP which is one-line protocol.
  • HTTP/1.0 released in the year 1996. It is the second version of HTTP which is Browser friendly protocol.
  • HTTP/1.1 released in the year 1997. It is the third version of HTTP which is common in use and standardise protocol.
  • HTTP/2.0 released in the year 2015. Current version which uses all features of previous versions.

Request response cycle :

Request Response Cycle of HTTP

HTTP works as a request response protocol between the client and server for transfer of data. Here the client (input) sends a request message to the web server through the internet. Where as web server receives the request and the server runs the application to process the request. Then server returns the HTTP response to the browser and at last client receives the response.

Some drawbacks of HTTP :

A web request with HTTP is insecure. Because any text that you type transfers in clear text to the web server. In this case it becomes vulnerable for hackers to get the data. Hence attacker can use man-in-the-middle attack to gain all info. For example, when you are typing details in the website like username, password, your credit card details etc, transfers in clear text format. So, the information transfers in clear text to the internet without encryption. This is the problem we face in HTTP because of that reason HTTPS came into picture.

So by the above info we got to know what is HTTP and its working. If we miss out any info you can comment in the section below.