HTTP/2 - Future of Web

HTTP/2 - Future of Web

In last 20+ years, Web Technologies have changed dramatically but HTTP standards were more or less same and we have to work around the limitations of HTTP/1.1 to cater the requirements and some of notable issues were:

  • Performance still falls short of full bandwidth utilization
  • Web design and maintenance are more complex
  • Resource consumption increases for client and server
  • Cacheability of resources suffers

HTTP/2 seems to have bigger promises for Web and addresses the shortcomings of HTTP/1.1 and some of key enhancements/differences are:

  • Key difference is in framing as how the request is laid out on the wire
  • It allows multiple requests per connection so instead of having to open multiple connections, we can send everything over one connection. and that is possible through Multiplexing. Requests and responses are sliced into smaller chunks called frames. Frames are tagged with an ID that connects data to the request/response. 
  • Prioirtisation - we can instruct the server in what order we would like to receive assets. For example, we could request to receive main.css before we receive image.jpeg. Since CSS files block rendering, we need to get those loaded as soon as possible.
  • Optimisation in terms of Server Push. Server sends multiple responses for one request and server already knows that browser is going to request these resources like CSS, JavaScript, images etc before renewing the page.
  • HPACK - compression for headers - we have been using gzip compression to compress the response body, but headers information was not compressed in HTTP/1 and Cookies can be quite lengthy, and combined with other headers, they can take up a lot of unnecessary space. HTTP/2 fixes this problem with compression

With growing traffic and data, we need continuos innovations in this regard to benefit Web and its capacity to deal with growing traffic and complexity of applciations. For most part, we don't need to modify our code because it is handled by Web Servers by enabling HTTP/2. 

Here is the link which provides details on Web Servers which supports HTTP/2.

https://github.com/http2/http2-spec/wiki/Implementations 

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics