Everyone understands the importance of improving the speed of your website, and HTTP/2 provides a great opportunity to do exactly that. As a relatively new opportunity, it is a great way to beat your competition and start improving the experience of your users today.
If you’re new to HTTP/2, don’t worry. We will run through what HTTP/2 is and how it allows web pages to load far more quickly in comparison to those using HTTP/1.1. It’s one of the biggest changes to the Internet made to date, and should be of interest to anyone concerned with user experience.
What is HTTP/2?
HTTP/2 is the latest version of HTTP (Hypertext Transport Protocol), the underlying protocol used by the World Wide Web, which defines:
- How information is transferred from one computer to another
- How messages are formatted and transmitted
- What actions web servers and browsers should take in response to various commands
In layman terms, HTTP is how websites are delivered to your computer, and the next version of it is about to make it much faster. More detail on the basic of the HTTP protocol can be seen in this short video.
What problem is it trying to solve?
In order to understand the importance of HTTP/2, we must first understand the problems it is trying to solve.
The most common transfer protocol on the web is HTTP/1.1 which was standardized back in 1999. The web back then was very different, with slower web pages and slower internet connections. But over the years, the way that we use the web has changed significantly and websites are now much more complex than they used to be.
Therefore, they are more demanding of the web infrastructure and the old HTTP protocol, which has lots of limitations and is becoming outdated. For this reason, we expect to see the “pipes” of the web being upgraded from HTTP/1.x to HTTP/2 over the coming years.
The aim of this transition is to ensure the web infrastructure that we are becoming ever more reliant on is robust enough to handle ever increasing amounts of data. It is the digital equivalent of moving from an A road to driving on a motorway.
To see the kind of speed increase that is possible, take a look at this video, which demonstrates in 5 seconds how a webpage loads faster in SPDY, the protocol that HTTP/2 is based on.
If you are not convinced yet of the differences in page load time, have a look at this study published by HttpWatch, which analyses and compares speed performance of HTTPS, SPDY and HTTP/2 and demonstrates how transfer speeds can increase up to a 20% with HTTP/2.
How is page speed improved?
One of the limitations of HTTP/1.1 is that it is only able to request files one by one on a single connection – this means requesting the file, waiting for a response, downloading the file and then requesting the next one.
This process can significantly increase page load time, especially for pages with a high number of requests. As illustrated in the image below, HTTP/2 changes how requests and responses travel between browser and server by “multiplexing” multiple files over one single connection.
HTTP/1.1 requests and responses are transmitted in plain text (causing a lot of unnecessary bytes being downloaded) but with HTTP/2, each bit of information is compressed and transmitted in binary code, making it more compact and efficient which avoids the user’s computer to wasting time translating the information into a format it understands.
This means that the overhead of each request will be smaller than the uncompressed HTTP/1.1 equivalent, saving significant bandwidth in some user sessions. Page load speed is critical upon mobile users, where the benefits of this feature become even more important.
With HTTP/2, the server will know what content the browser needs in order to render the page and will be able to supply – or “push” – this data to the web browser before it actually requests it, saving a lot of time.
SEO benefits and drawbacks
Benefits of HTTP/2:
The benefits of moving over to HTTP/2 are immediate as over 75% of UK users are using browser that can take advantage of the protocol, a figure only set to rise.
- Faster Load Times: HTTP/2 promises to be faster than the current standard as it removes many impediments of the protocol.
- More Secure: Because HTTP/2 will have encryption on by default, security across sites using the protocol will be increased.
- Mobile friendly: The header compression feature allows mobile sites with high amount of requests to prevent wasted megabytes from the headers from being downloaded.
- HTTP/1.1 Compatibility: To ensure that the switch to the new protocol is as smooth as possible, servers and browsers which remain only HTTP/1.1 compatible will still be able to communicate with HTTP/2 servers/browsers (both parties will have the ability to decide which version of the protocol will be using to communicate with each other, as illustrated in the image below).
Drawbacks of HTTP/2:
Nonetheless, there are also some limitations businesses should take into account before switching to the new protocol.
- Be aware of your audience: Although 75% of UK users are using browsers than can take advantage of the protocol, a number of people continue to use older browsers which don’t. Additionally, not all web servers out there support HTTP/2. Therefore, current page speed optimisation techniques will remain necessary.
- HTTPS Prerequisite: Switching from HTTP/1.1 will be more difficult if a site isn’t already using HTTPS, since HTTP/2 has the prerequisite of the site already being on HTTPS. Migrating a website to HTTPS will need some work, requiring all HTTP URLs to be redirected to the HTTPS secure version of the protocol. However, HTTPS is a positive ranking factor for Google and, since security is a top priority for the search engine, we expect them to apply more weight to this signal in the future. Therefore, it would be a good idea to upgrade your site as and when you can.
- Performance impact could be minimal: Switching from HTTP/1.1 to HTTP/2 could take a lot of time and resources so it’s important to be sure that the impact in site speed worth it. If a website is already well-optimised for speed, the performance improvements might be smaller than expected.
- HTTP/2 Unknowns: The protocol is still relatively new; a lot of studies will have to be conducted in order to determine best practices and possible pitfalls.
Every protocol, including HTTP/2, works like a spoken language: for the communication to be effective, both the sender and receiver (in this case, the web browser and web server) need to speak the same language.
HTTP/2 is designed to improve current HTTP standards, not replace them entirely. Therefore, the current guidelines on how web elements (such as URLs, HTML markup, redirects, 404 pages, etc.) work remain the same and are just used more efficiently.
The process for upgrading from HTTP1.x to HTTP.2 has four steps:
Step 1: Make sure your website is using HTTPS
HTTP/2 has the prerequisite of the website being already in HTTPs, but it is important to note that HTTP/2 requires an improved version of the transport layer security (TLS1.2), which was standardised in 2008; it offers better security than previous versions and should already be used by the majority of services.
Step 2: Check if your visitors’ browsers support HTTP/2
Most of the modern browsers across both desktop and mobile already support HTTP/2. However, we recommend you find out in Google Analytics what browsers your visitors are using and check them against this list of browsers that support HTTP/2.
Step 3: Update and configure your server software or infrastructure to support HTTP/2
First you will need to verify whether your web server already supports HTTP/2; if it already does, you won’t need to do anything; if it doesn’t, you will need to upgrade the version of your server or switch to one that does.
Because there might be still users using older browsers, we recommend you use a server that supports both HTTP/1.1 and HTTP/2. This way, people using newer browsers will communicate with your server using HTTP/2, whereas older browsers will continue using HTTP/1.1 connections.
Apache and Nginx are the most commonly used servers in the web (both together serve traffic for 66% of all active web servers) and both of them support HTTP/2 so it is quite likely that your website’s server can support HTTP/2 already.
As IIS explain in this article, there are no new IIS configuration settings specific to HTTP/2 so if you are using one of these servers, you shouldn’t need to change anything in your application for HTTP/2 to work.
On the other hand, if you aren’t using any of these, you can also place a reverse proxy that supports HTTP/2 (like HAProxy) in front of your existing web server.
Step 4: Continue to optimize your website speed as usual
As search engines and consumers constantly demand faster experiences, the opportunity of HTTP/2 should be of great interest to brands looking to gain competitive advantage. It’s one of the biggest changes to the Internet to date, and now is the right time to start evaluating whether this is right for your business.
Googlebot does not currently request URLs over the HTTP/2 protocol itself yet, but you don’t need to wait to start getting the advantage. Pages will load faster for your users, which makes them happy, and through search engines leveraging user signals, this will lead to improved SEO performance.
Note: The opinions expressed in this article are the views of the author, and not necessarily the views of Caphyon, its staff, or its partners.