In this tutorial, you will learn about HTTP2. You will learn what it is and how to enable HTTP2 within your Episerver CMS powered website.

What Is HTTP2?

Over the last year or so, HTTP2 is becoming a more widely adopted standard. We all know and love HTTP, however, it's getting on in age a bit now. Over the last 2 decades, websites and technology have come a long way. In the 90s, a website was built mainly using some HTML with some spinning gifs. Nowadays, according to research by Daniel Sternberg, the average web page size is now is 1.9 MB. A page on average contains over 100 resources. As HTTP isn't particularly efficient when retrieving a large number of resources, some clever people at Google started some research on how to improve HTTP. This research 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.

A lot of browsers support SPDY, however, it did not get full adoption. Instead, times have moved on we now have HTTP2. HTTP2 is now the agreed protocol that will be used in the future. HTTP2 was built upon on SPDY, so using HTTP2 will provide much better performance benefits compared to websites that only serve traffic using HTTP.

One of the main reasons HTTP2 is faster is multiplexing. Multiplexing allows a client's browser to download more requests in parallel making it quicker to render a page. One reason sites do not use HTTP2 yet is server support. Not all servers support HTTP2. The good news is that more servers are being updated to support HTTP2 and more people have browsers that support HTTP2.

Your once well-honed and performant website may start to seem slower compared to your competitor's site that has been optimized for this new protocol. HTTP2 is something any good web developer should be thinking about and planning on implementing. So he do we go about enabling it 🤷‍♂️?

How can I test it my current website uses HTTP2

Checking if your current website uses HTTP2 is quick and painless. There's an online checker you can use here, simply visit the page, enter your website Url and check.

Let us talk about making your site HTTPS2 compliant. Here's the good news/bad news part, in order to use HTTP2 on your .NET powered website, your servers will need to run IIS 10. IIS 10 only comes with Windows 10 or Windows Server 2016. 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. IIS10 will only use an HTTP2 connection under HTTPS. If your website doesn't use HTTPS yet I would strongly recommend reading this article, How To Make Your Episerver Website Run Via HTTPS.

HTTPS can now provide both SEO ranking benefits and it can also make your website run faster, the decision to use it is a no brainer! HTTPS is pretty cheap in the grand scheme of things. It costs something like £30 a year so after paying for your Episerver license the costs are tiny. I won't go over the process of creating an HTTP certificate here, as there are several good articles - here's one for IIS 7 as the process hasn't changed much, Installing an SSL Certificate in Windows Server 2008 (IIS 7.0). After upgrading your server, your site should start to automatically run using HTTP2... it's that simple!

The aim of this guide was to make you aware of HTTP2, 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. If you can upgrade you can agree, you will get a lot of useful benefits. Most of the main SEO companies will flag not having HTTP2 within a good performance report. Having an understanding around it is something we will all need to have, sooner rather than later, so why wait? Happy Coding 🤘