Monitoring CDN
20 Aug 2018

HTTP/2 and the 3 Ways It Improves Your Website

HTTP/2 is an improved HTTP protocol which was created to overcome the issues inherent in HTTP1.1. By deploying sites on HTTP/2, website administrators can improve performance, enhance efficiency, and reduce deployment complexity.

The Internet we know today is built on the Hypertext Transfer Protocol (HTTP). Tim Berners Lee initiated the development of HTTP in 1989 while he was at CERN and with the creation of this protocol, the World Wide Web was born. Since its inception HTTP has enabled the creation of over 1.9 Billion websites and counting and set the platform for a wide variety of other Internet-based services we use today.

1992 saw the first official release of HTTP (HTTP0.9), and after a few modifications, official recognition for HTTP1.0 occurred in 1996. 1997 saw the release of HTTP1.1, and until the release of HTTP/2 in 2015, the protocol which had come to run every facet of our digital lives, changed very little.

So, Why the Move from HTTP1.1 to HTTP/2?

The primary issue with HTTP1.1 which initiated the development of HTTP/2 was speed and efficiency. HTTP1.1 is only able to process one HTTP request per TCP connection which forces browsers to open multiple connections to handle several requests concurrently.

Modern websites consist of multiple web assets. Images, text, stylesheets, and script files exist on every web page. Sites running on the HTTP1.1 protocol force a browser to open a connection to process each asset, so a webpage with multiple images, script files, and stylesheets requires a browser to open a TCP connection for each one. As the number of concurrent visitors to a site increases, the networking resources serving the site come under pressure causing a detrimental impact on performance and user experience.

Data duplication is another issue which plagues sites running on HTTP1.1 as a result of the single TCP connection limitation. Because HTTP is a stateless protocol, sending cookie and header information is necessary with each request. This redundant data stream, where the same cookie and header information is part of each request, is both inefficient, and as the number of concurrent users increases, becomes a performance issue.

What’s New in HTTP/2

HTTP/2 was developed to address the shortcomings of HTTP1.1 and introduced several innovative features to increase the speed and performance of modern websites.

Multiplexing

First and foremost, HTTP/2 is a multiplexed protocol which allows multiple requests on the same TCP connection. This multiplexing feature allows several website assets to be processed by browsers on the same TCP connection which improves both the loading speed of a webpage and enables the efficient transmission of data between the browser and the web server. Not only does this feature improve website performance for the user, but it also gives server administrators the ability to do much more with fewer server resources creating efficiencies on both ends of the HTTP request.

Stream Priority

Stream priority is an HTTP/2 feature which gives browsers the ability to load webpage assets in order of preference. With HTTP1.1 webpage assets were loaded in a random order. Without stream priority, HTML and JavaScript files could be processed before any stylesheets, creating a poor user experience. HTTP/2 allows browsers to load webpage assets in order of priority where HTML is loaded first, followed by the relevant stylesheets, then JavaScript and finally any images. This loading order not only allows browsers to render web pages much faster but also enhances the experience of the user viewing the site.

Compression, Browser Push, and Binary Data Transmission

HTTP/2 also automatically compresses HTTP headers which reduces the amount of data traveling between the server and the browser. It also allows servers to push responses proactively into the user’s browser cache. These protocol features are far more efficient and enhance the user experience. Also, the HTTP/2 protocol is binary unlike its predecessor, HTTP1.1 which is textual. This protocol modification is another productivity improvement considering the efficiency of binary data transfers across a distributed network. Finally, HTTP/2 allows for encrypted connections which are much faster as determining the application protocol occurs during the initial connection.

What Are the Benefits of HTTP/2

HTTP/2 was built to improve performance, and faster-performing websites have numerous benefits. Furthermore, HTTP/2 also improves network efficiency in that the data transmitted between the browser and the server is much less than the standard data transmission load of HTTP1.1. These performance and efficiency improvements result in several business and technical benefits for website operators.

1 – Performance

As mentioned, HTTP/2’s primary benefit is that it increases performance. Through its deployment of multiplexing, stream priority, header compression, proactive browser push and the fact that it is a binary and not a textual protocol, HTTP/2 improves the performance of websites substantially. For a demonstration of the loading speed between a site running on HTTP1.1 and a site running on HTTP/2, visit this page on our website where the performance improvement is clearly evident.

A fast loading website has multiple business benefits. First and foremost, first impressions last. A first time visitor to a site is very unlikely to return if their first experience is a site which loads slowly. In fact, 40% of consumers leave a page that takes longer than three seconds to load. Fewer visitors to a site also translates into fewer conversions which detrimentally affects the viability of a website, primarily if it is being used to promote or sell goods and services online.

2 – Efficiency

HTTP/2 is also a very efficient protocol which restricts the amount of data transmitted between the browser and the server. The binary nature of HTTP/2, as well as the header compression utilized by the protocol, helps improve not only the efficiency of the network serving the website but also improves the resource utilization on the server and the user’s browser.

An efficient network, server, and browser means the server can host more sites, networks can carry additional traffic, and end-user computing devices can process more applications, and all this is made possible without requiring additional resources.

Due to the increased efficiency of HTTP/2, businesses can save costs, improve the utilization of their infrastructure and reach more users. Data transmission costs money both in time and in the actual network expenditure. Both the service provider and the user need to spend financial resources on data access, and the fact that transmission via the HTTP/2 protocol is less than HTTP1.1, means both the business and the user benefit from a decrease in data cost. In parts of the world where Internet access is scarce and expensive, providing users with the ability to view a site which costs them less in real financial terms gives businesses the opportunity to reach potential customers they would not have had access to before.

The increased efficiency of data transmission on HTTP/2 also benefits mobile users in speed, cost, and experience. With mobile making up 51.2% of total global Internet online traffic, businesses need to ensure their sites cater to this user base. Not only do they need to ensure their sites render correctly on the smaller screens of mobile devices, but reducing mobile data costs by using an efficient protocol like HTTP/2 also reduces the financial charge for the end user.

3 – Simplified Development and Deployment

The introduction of features like multiplexing and stream priority in HTTP/2 have also helped web developers simplify the development and deployment of their websites. Due to the performance and loading restrictions inherent in HTTP1.1., developers had to build workarounds to get their sites to load faster under the slower protocol. Techniques like domain sharding, which reduced load times by accessing files from multiple domains, combining images and files, as well as placing CSS and JavaScript in the HTML code, are all redundant with HTTP/2. The fact that developers no longer need to concern themselves with these performance workarounds makes the management and maintenance of a website much less complicated and helps improve development time.

How To Check if Your Site Supports HTTP/2

There is no doubt that HTTP/2 is the protocol every website should be running. It improves performance, is more efficient, and reduces development and deployment complexity. To check if your site supports HTTP/2 visit this test page on our website.