Close

HTTP

[Last Updated: Feb 11, 2016]

Web HTTP 

HTTP stands for Hypertext Transfer Protocol.

It is a Communication Protocol designed for World Wide Web(www) communication.

HTTP is an application layer protocol designed within the Internet Protocol Suite TCP.

HTTP communication is based on hypertext data format. Hypertext is basically text displayed on devices containing references, as hyperlinks, to other resources.

HTTP uses the client-server model. A HTTP client opens a connection and sends a request message to an HTTP server, the server then returns a response message, usually containing the resource that was requested. After delivering the response, the server closes the connection.

The one response for one request model makes HTTP a stateless protocol. That is, server does not keep connection information between each request/response transactions.

The request/response message (typically known as HTTP message) follows standard format.

The original version was HTTP/0.9 , and then later versions HTTP/1.0 and HTTP/1.1 extended the original protocol.


HTTP/0.9: It was designed to handle only hypertext documents. The request looks like this:

GET /


HTTP/1.0: This version defined in details how it should be used for client requests and server responses. It introduced http request methods GET, POST and HEAD methods. It also handled many types of different media. It supported caching via the header. The HTTP/1.0 request looks like this:

GET / HTTP/1.0


HTTP/1.1: This version requires to have a Host header. This header is useful because it allows to route a message through proxy servers, and also because web server can distinguish between different sites on the same server. It supports more than one request/response on the same HTTP connection. It also introduced new methods: OPTIONS, PUT, DELETE, TRACE and CONNECT

GET / HTTP/1.1
Host: www.example.com

HTTP/2.0: It was published in 2015. It decreased latency to improve page load speed, supported Server push, improved header, several requests can be sent in rapid succession on the same TCP connection.