Difference between HTTP 1.1 and HTTP/2
HTTP/2 is a new version of the Hypertext Transport Protocol. HTTP/2 is used to deliver pages to the browser from server on the Web. It is the first major update of HTTP. In 1999 HTTP was introduced, during this time webpages were usually just a single HTML file with inline CSS. Now we are facing the limitations of HTTP 1.1 as Internet has changed a lot from 1999 till present. For most modern websites there is transfer speed limits because data is downloaded in queue i.e. the previous part is downloaded first then next page is downloaded and so on, and about hundred request is needed to download an average modern webpage (webpage requests images, files, css, javascript files, etc..)
To overcome these problems HTTP/2 is introduced with few fundamental changes
-
In HTTP/2 all the requests will be downloaded in parallel while in HTTP 1.1 requests were made in a queue.
-
In HTTP/2, HTTP headers are compressed, but in HTTP 1.1 headers are not compressed.
-
In HTTP/2, server can "push" the data without user's request, this will increase the speed for users with high latency. While in HTTP 1.1 speed for users is less.
-
In HTTP/2 pages are transferred through wire as a binary which is more efficient. While in HTTP 1.1 pages are transferred through wire as text files which was not efficient.
Google Chrome
and Mozilla Firefox
has stated that they will support HTTP/2 only for HTTPS connections due to security reasons even though HTTP/2 does not require encryption. Therefore you must secure servers with HTTPS if you decide to set up servers with HTTP/2
Thanks for reading the blog.
0 Comment(s)