HTTP/2

HTTP/2

What is HTTP/2?

HTTP/2 is the second major version update to the HTTP protocol since HTTP1.1 which was released more than 15 years ago. The HTTP/2 protocol was developed due to the ever-evolving digital world and the need to load more resource intensive web pages.

We discussed SPDY in a previous article which was also implemented to help reduce web page latency users experience when using HTTP1.1. HTTP/2 is based off SPDY, however contains key improvements that has lead to the deprecation of SPDY in February, 2015.

You can verify with the HTTP/2 test tool if you server supports HTTP/2.

Differences from HTTP1.1

Similar to SPDY, using HTTP/2 does not require any changes to how web applications currently work however, applications are able to take advantage of the optimization features to increase page load speed. According to the HTTP/2 home page, the high-level differences between the HTTP1.1. and HTTP/2 protocol include the following:

  • HTTP/2 is binary, instead of textual
  • It is fully multiplexed, instead of ordered and blocking
  • It can use one connection for parallelism
  • It uses header compression to reduce overhead
  • It allows servers to “push” responses proactively into client caches instead of waiting for a new request for each resource

Comparison of SPDY3.1 and HTTP/2

Although SPDY and HTTP/2 both have the same goal in mind, there are key variations that exist between them. The following table outlines a few of the high-level differences between SPDY3.1 and HTTP/2

SPDY3.1 HTTP/2
To use the SPDY protocol and take advantage of its features, SSL is required. SSL isn’t required, however encrypted websites will see a boost in performance over today’s encrypted sites.
Multiplexing happens on one host at a time, known as single host multiplexing. Multiplexing happens on different hosts at the same time, known as multi-host multiplexing.
SPDY’s stream-based compression method leaves a slight opening to protocol vulnerabilities. Uses a fixed Huffman code-based header compression algorithm to further prevent attacks and shorten headers.
SPDY’s encrypted connections are fast however they do not use the ALPN extension. Uses the ALPN extension which allows for faster encrypted connections by letting browsers and servers to decide which application protocol to use initially.

HTTP/2 Support

Most major browsers fully support the use of HTTP/2. This means that if the website you are trying to access runs on an HTTP/2 supported server, your browser will be able to utilize its features. However, although the working group did not require the use of encryption for the new protocol, currently all major browsers only support HTTP/2 over HTTPS.

A more detailed history of browser versions that do support HTTP/2 can be found here.

Browser Supported
Chrome Yes
Firefox Yes
Microsoft Edge Yes
Safari Support limited to OSX 10.11+
Opera Yes
iOS Safari Yes
 IE Supported in version 11, but only for Windows 10.
Android Browser No

Conclusion

HTTP/2 is without a doubt the direction the web is moving towards in terms of networking protocol that is able to handle the resource needs of today’s websites. While SPDY was a great step forward in improving HTTP1.1, HTTP/2 has since further improved the HTTP protocol that has served the web for many years.

Given you have a server that supports the HTTP/2 protocol, you can start serving content over this protocol to users that are accessing your content through a supported browser. For browsers that do not support HTTP/2, they will continue to be delivered content through the old protocol. Using the HTTP/2 protocol will help make websites faster and overall will improve the web’s user experience.

2 Comments

Leave A Comment?