HTTP/1.1 vs HTTP/2

Kashish Yadav
2 min readNov 5, 2020

The hypertext transfer protocol or HTTP is an application protocol that has always been the standard for all communications on the World Wide Web since its conception. It allows for fetching of resources (such as HTML documents) over the internet. Simply put, every time we enter an URL in our browser (client), a HTTP request is sent to the server. The first ever version of HTTP that was released was HTTP/0.9 by Tim Berners-Lee. HTTP/1.1 was released in the year 1997 and there have been little changes made to it until recently. HTTP/1.1 had an advantage over its last predecessor (1.0) in a way that it was relatively faster since it uses a “Keep-alive” header. This means that every time a request was shot from a host was “kept alive” until all requests are fulfilled. This was not the case with HTTP/1.0 since it required a new TCP connection with each request and HTTP/1.1 uses persistent TCP connection. This made it very slow and therefore had a higher latency when compared to HTTP/1.1.

In 2015, HTTP/2 came into existence, which contained several methods to decrease latency, especially in mobile platforms and server-intensive graphics. Some estimates suggest that about a third of all the websites now support HTTP/2 due to its benefits and increasing popularity. HTTP/2 has features like compression, multiplexing, use of SPDY protocol and is also more secure than HTTP/1.1. Compression in HTTP/2 refers to “header compression” -Compressing headers reduces their size in terms of numbers of bytes that are transmitted during the connection. Using HTTP/2 that deploys the HPACK format for header compression, (HPACK is a header compression algorithm that HTTP/2 supports) the pages will load faster with better interactive response time.

--

--