HTTP/2… why you should care!

HTTP/2 (originally named HTTP/2.0) is the second major version of the HTTP network protocol used by the World Wide Web”

Now we have that out of the way, there are a few reasons to take notice of this and a few things you may want to do in order to take advantage of it.

What is wrong with normal HTTP?

HTTP is old… in terms of the Internet it is very very old indeed. It was standardised in 1997, when a lot of web developers were still learning learning to walk! It did the job, but as websites became bigger and more complex it was a constant struggle to get the site to display at a reasonable speed, even with modern high-speed connections.

The crux of the issue is the fact that sites are made up of lots of files and the HTTP protocol only allows a certain amount of transfers at the same time. This increased over time but there has always been the situation whereby files sat in a queue waiting to be downloaded by the browser.

What web developers started to do was use techniques such as merging multiple CSS files into a single one, using CSS sprites so icons were downloaded in a single file. All this to get around the queueing system. There was also the problem that if some files got “stuck” then everything else had to wait in line, causing very erratic behaviour at times.

How does HTTP/2 help?

HTTP/2 does away with the queuing system by using something called multiplexing. Without going into the finer details it basically means that browsers can download a lot more content at the same time (if the browser and server both use HTTP/2) and things should perform a lot faster.

Server pushing is also used in order to speed up the rendering experience. In the pre HTTP/2 world the browser downloads the full HTML page first, then starts grabbing the assets it needs such as CSS files and javascript. With HTTP/2 the server is able to send over files it knows the client needs into the cache, so by the time the HTML file is loaded the assets files have also started to arrive. Add in header compression and you have a much more streamlined method of loading pages

So what’s the catch?

While technically there is no requirement for encryption to use HTTP/2, several implementations have said they will only support HTTP/2 over a TLS encrypted connection. There are several reasons for this, which may or may not change over time, but for now you must use an HTTPS connection to take advantage of HTTP/2.

What this means to most users is they must have an SSL certificate for their domain, if not their users will get nasty messages about unsecured connections and/or mixed content.

Should I use HTTP/2?

Google have already stated they are starting to give sites using HTTPS a slight advantage in the ranking mechanism, so now is a good time to at least consider using HTTP/2 for your sites.

That said, HTTP/2 is very new and currently only supported by a hand full of hosts. For now if you convert your site to use HTTPS you will be in good shape to enable HTTP/2 as soon as it is supported on your host, and thus take advantage of a very real boost in performance!

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *