HTTP/2: It’s time.

I’m sure by now you’ve seen all the terrifying stats about how a one second increase in page load time results in the end of days so, I’ll try to keep this as light-hearted as possible. Page Speed IS a ranking factor and users DO hate waiting for a page to load. No longer are death and taxes life’s only inevitability, HTTP/2 is here.

It’s a lot like that NutriBullet Pro 900 Series you got in January. You are fully aware it exists, and of its numerous benefits, but you’re still not using it. You know you should but it’s just not a priority right now. Well, I am here to convince you now is the perfect time to start. Grab your carrots – it’s migration time.

What is HTTP/2?

As the name suggests, HTTP/2 is the newest version of Hypertext Transfer Protocol (HTTP) used by the ‘interweb’. It was presented as a proposed standard in 2014 after being derived from Googles SPDY protocol. It was widely supported by major browsers a year later and is now supported by over 18% of the world’s top 10 million sites.

The main goal of HTTP/2 is to significantly improve page load time in browsers by reducing load latency. To achieve this, the protocol addressed the key limitations of HTTP/1.1, including: Data compression of HTTP headers, Multiplexing multiple requests over a single TCP connection, Protocol negotiation and Pipelining requests.

I’m not going to bombard you with all the technical jargon however, if that is your thing then Google’s introduction to HTTP/2 and the HTTP/2 official GitHub should keep you more than satisfied.

Perhaps the most crucial difference between the two protocols is the pipelining of requests. HTTP/1.1 uses a ‘waterfall’ structure where the server must send its responses in the same order that the requests were received — so the entire connection remains first-in-first-out. HTTP/2 allows multiple requests to be sent simultaneously, often resulting in a dramatic improvement in the loading times of HTML pages. The diagram below will hopefully make that a little clearer.

HTTP/2 loading vs HTTP/1.1

HTTP/2 loading vs HTTP/1.1

Why Should I Switch to HTTP/2?

I know what you are thinking, that sounds all fine and well but why should I care?

The answer is – you shouldn’t.

If you are happy missing the opportunity to be an early adopter, to gain that competitive advantage, to make your visitors happy and therefore more likely to convert then you shouldn’t care. However, if you appreciate the importance of speed, particularly with the mobile first index continuing to develop, then it’s time. Don’t believe me? Just watch.

A study by QuBit.com concluded that 8% of users abandon a purchase if they experience slow loading pages. Currently, Google doesn’t directly reward websites that use HTTP/2 but it does play a role in your organic visibility – because you will, hopefully, benefit from an improvement in website speed and therefore user satisfaction which will show up in the UX metrics Google are increasingly looking at as ranking factors.

If that doesn’t convince you then the fact that Google itself is recommending migrating – and already uses the protocol - should definitely be the final nail in HTTP/1.1s’ coffin.

How Do I Migrate?

Now I have convinced you to switch to HTTP/2 - fingers crossed emoji - you’ll be glad to hear the change itself is a relatively straightforward process. There are a few checks you will want to carry out to make sure switching will be beneficial.

Rather than cram a full technical migration guide into this relatively short post I will list some more comprehensive sources below. Some important things to consider are:

Checking Browser Compatibility

Most browsers do now support HTTP/2 but some older versions do not. You may want to check whether a significant part of your visitors use supporting versions of browsers and therefore will be able to benefit from the change.

This can be done by going into your Google Analytics account and then going to the Audience > Technology > Browser & OS report. By default, your primary selected dimension will be set to Browsers. Change the secondary dimension to Users > Browser version. As a result, you will see a table with the number of visitors of your website broken down by browser and version. Now you have an overview of the browsers being used by your sites visitors you can check what versions of browsers currently support HTTP/2 here.

It is important to note that users in browsers that don’t support HTTP/2 will still be able to access your site through HTTP1.1.

HTTPs and HTTP/2

If your site is still not secure then you should migrate before moving to HTTP/2. HTTPs has many benefits – not least because it’s now a certified ranking factor – and most browsers will simply ignore the HTTP/2 version of your website if it is not secured.

Many people don’t consider the fact that HTTPs can add latency to a client server exchange, due to the number of secure ‘handshakes’ required. But utilising HTTP/2 can go some way to combat this. This guide from Moz provides some more insight into HTTPs and page speed.

Optimising JavaScript & CSS

Many traditional techniques used for site speed optimisation have been developed to make websites load faster under the assumption you are using HTTP/1. If/when you decide to switch to HTTP/2, a number of these are no longer relevant and it actually makes sense to undo them.

For example, with HTTP/2’s speed benefits, it’s best practice to only load the JS/CSS code a user actually requires when visiting a page. This is likely the most complex part of migrating to HTTP/2 and may be best left to tackle when you re-design your site. It’s optional, but necessary to take full advantage of the protocol.

To achieve this, you will need to audit every URL on your site to identify what specific JS and CSS is used each page and develop an automated system that conditionally loads the relevant code on each URL as a user requires it.

Image Sprites are another technique to improve your site’s speed performance on HTTP/1.1. With HTTP/2 this technique is unnecessary, as the new protocol carries out numerous requests in parallel. There is no benefit to fetching one large image instead of many smaller ones.

For more in-depth articles on migration I recommend checking out the following guides:

https://httpd.apache.org/docs/2.4/howto/http2.html

https://raventools.com/blog/free-ssl-http2/

https://www.gatherdigital.co.uk/community/post/how-to-setup-http-2-support/41

Conclusion

Hopefully at this point I have convinced you of the many benefits of HTTP/2 and why now is the perfect time to switch. It is important to consider the points mentioned above to decide if it’s right for your site and your site’s users.

With only approximately 7% of websites currently using HTTP/2 there is a clear opportunity to get ahead of your competitors and benefit from the fastest website possible.

Migrating itself is relatively painless and if carried out efficiently, and combined with HTTPs, should result in a notable improvement in your sites performance in terms of both rankings and conversions.