HTTP

Hi all, this is the 50th post of my blog! From this post I’m going to talk about a protocol which make the Internet works. HTTP or Hyper Text Transfer Protocol, is a protocol used to communicate between the client and server. It was proposed by Tim Berners Lee, the inventor of the web as well. His design goals were much more broader,

File transfer functionality

Ability to request an index search of a hypertext archive

Format negotiation

Ability to refer the client to another server

But finally a simple prototype was built, which implemented a small subset of the proposed functionality:

Client request is a single ASCII character string

Client request is terminated by a carriage return (CRLF)

Server response is an ASCII character stream

Server response is a hypertext markup language (HTML)

Connection is terminated after the document transfer is complete

Using a simple telnet command we can send a request and can get a response like shown here.

EVOLUTION

When talking about the evolution of HTTP protocol, we can see some major versions such as HTTP 0.9, HTTP 1.0, HTTP 1.1 and etc. HTTP 1.0 as we know it is not a formal specification or an Internet standard.

Let’s see some of the features of HTTP 0.9:

Client-server, request-response protocol

ASCII protocol, running over a TCP/IP link

Designed to transfer hypertext documents (HTML)

The connection between server and client is closed after every request

Now let’s see some of the characteristics of the HTTP 1.0: Actually the name should have to be changed to Hyper Media Transfer Protocol, but the HTTP name stuck.

Request may consist of multiple newline separated header fields

Response object is prefixed with a response status line

Response object has its own set of newline separated header fields

Response object is not limited to hypertext

The connection between server and client is closed after every request

Now let’s have a look at characteristics of HTTP 1.1 :

Introduced a number of critical performance optimizations

Keepalive connections

Chunked encoding transfers

Byte-range requests

Additional caching mechanisms

Transfer encodings

Request pipelining

Encoded character set

Language negotiation

Transfer encoding

Caching directives

Client cookies

Still the HTTP 2.0 is on evolving stage. The primary focus of HTTP 2.0 is on improving transport performance and enabling both lower latency and higher throughput. According to stats, as of February 2016 6.7% of the top 10 million websites supported HTTP/2. Here are some stats taken from w3techs web site about HTTP popularity.

Hope now you have an idea about the HTTP protocol and its evolution. For more information about HTTP please check these posts as well,