Over the last year or so, HTTP/2 has become a more widely adopted feature, yet a lot of web developers still don't know that much about it. In today's post, I'm going to talk about what HTTP2 is, why you should be using it and how to implement it with your Umbraco website.
What Is HTTP/2?
We all know and love HTTP but it's getting on a bit now. Over the last 2 decades, websites have come a long way. In the 90s you might have had some basic websites with some spinning gifs, nowadays, according to research by Daniel Sternberg, the average web page is now is 1.9 MB, with over 100 individual resources required to render itself. As HTTP doesn't deal particularly with retrieving a large number of resources, some clever people at Google researched some ways to support it better, which resulted in a protocol called SPDY. The aim of SPDY was:
- allow concurrent requests across a single TCP connection, known as multiplexing;
- allow browsers to prioritize assets so that resources vital to the display of a page could be sent by the server first;
- compress and reduce HTTP headers;
- implement server push, whereby a server can push vital resources to the browser before being asked for them.
Most modern browsers support SPDY, however, times have moved and it's slowly becoming deprecated. HTTP/2 is the agreed protocol of the future and it's the protocol you should be focusing on. HTTP/2 was built upon the principles SPDY, so using HTTPS will provide the performance benefits listed above. Put simply, an HTTP/2 connection will load a website quicker that an HTTP connection.
The main reason for this performance benefit comes from the multiplexing support. Multiplexing, allows a client's browser to download more of your web page HTTP requests in parallel making it quicker to render. Moving forward, as more servers are updated to support HTTP/2 and more people have browsers that support HTTP/2, your once well honed and performance website will start to seem slower compared to websites optimized for the new protocol. So this is something any good web developer should be starting to think about implementing.
How can I test it my current website uses HTTP2
Checking if your current website uses HTTP/2 is quick and painless. There's an online checker you can use here, simply visit the page, enter your website's Url and check.
How To Install HTTPS/2
Here's the good news/bad news part, in order to use HTTP/2 on your website, your servers will need to run IIS 10. IIS 10 only comes with Windows 10 or Windows Server 2016 and as of writing IIS, 10 has not been made available for older operating systems.
If you are building a new site, I would highly recommend you run the latest version of Windows just for this benefit. If your servers are running older versions then you will have to make the business decision if the cost of upgrading all your servers is worth it. The only other thing you need except for IIS10 is an HTTPS certificate, as IIS10 will only use an HTTP2 connection under HTTPS.
If your website doesn't use HTTPS yet I would strongly recommend reading this article, Umbraco SEO, HTTP or HTTPS?. As HTTPS also provides you a ranking bonus in Google/ so now not only does HTTPS make your site more secure and gives you a ranking bonus it can also make your website run faster! HTTPS is pretty cheap in the grand scheme of things.
Umbraco is free, so paying out £30 a year is tiny. I won't go over the process of creating an HTTP certificate here as there are several good articles, there's one for IIS 7 as the process hasn't changed much, Installing an SSL Certificate in Windows Server 2008 (IIS 7.0). After this, your server should automatically start using HTTP/2 for you... it's that simple!
The aim of this guide was to make you aware of HTTP/2, the benefits your website will gain from using it and in reality how easy it is to get up and running with it. Granted if your current website isn't on Server 2016 upgrading now might be too much work, however, if you can upgrade then you will get a lot of useful benefits. Most SEO companies will now flag that your website doesn't run under HTTP/2, so having an understanding around it is something we will all need, sooner rather than later.