The introduction of HTTP/2, the latest version of the HTTP protocol, is helping to make the web faster. With advancements in technology creating demanding users and heavier sites, speed has quickly become an important factor for both users and search engines.
The new protocol will make it possible for websites to load faster while using fewer server resources, increasing site speeds and boosting search engine rankings. As the web moves to HTTP/2, it’s important to learn more about it, understand how this new protocol works, and why it’s important to you and your site.
What is HTTP/2?
HTTP/2 is the latest update to the Hypertext Transfer Protocol, the essential way that the servers connect to each other on the web. HTTP/2 is based on Google’s SPDY protocol, which was developed to improve the speed and performance of browsing on the web.
Essentially, HTTP/2 makes one connection to the server, then “multiplexes” multiple requests over that single connection to receive multiple responses at the same time.
In the Moz article HTTP/2: A Fast, Secure Bedrock for the Future of SEO, Billy Hoffman uses this analogy:
Think of multiplexing like going to the grocery store and calling your spouse just once to get the full list: “Okay, we need milk, eggs, and butter. Check.” Compare this to HTTP/1.1 which is like calling your spouse over and over: “Do we need milk? Okay, bye.” “Hello me again — do we need eggs too? Yep, okay.” “Okay sorry one last question, do we need flour too? Nope, good.”
By multiplexing, all the data is interwoven much more efficiently on that one connection. And with how important loading time is today, interweaving the data means faster load times.
What does HTTP/2 do better?
HTTP/2 brings advancements in speed, security, and efficiency. Here are just some of the major improvements:
Unlike HTTP/1.1, the new HTTP/2 uses only one connection to load a site, and that connection remains as open as long as the site is open. This reduces the number of round trips needed to set up multiple TCP connections.
By allowing multiple requests on the same connection, HTTP/2 reduces the required time to process the requests that are sent and received. This speeds up the loading time and improves the user experience.
With HTTP/2, the server analyses the client’s next request and sends additional information even before it’s needed. By allowing the server to push data, it cuts down on loading time even further.
HTTP/2 transfers data in a binary format, removing the current steps of translating text to binary protocols and back again.
With HTTP/2, you can compress the headers further, cutting down on the size and download time.
When a browser connects to a server using HTTP/2, it uses a secure connection — https instead of http.
HTTP/2 is currently supported by approximately 70% of the browsers available — including Chrome for Android and iOS Safari.
What do I have to do to use HTTP/2?
It’s likely you’ve already been using HTTP/2, just not necessarily on your own website. If you use Chrome as your browser and access Gmail, you’ve been using SPDY and HTTP/2 already.
Since HTTP/2 is a server protocol, you can only fully switch to HTTP/2 if you have full control over your server. We’ll have an article later on detailing how to do this for your VPS or dedicated server.
Before you can set it up on your server, however, you need to make sure your website can be fully accessed through a TLS connection. Get an SSL certificate and set it up for your site. We’ll also have an article going through this process at a later date.
There are more things you can set up and check before you switch to HTTP/2, such as checking your images, adjusting your server calls, and more. Smashing Magazine produced a convenient action plan in Rachel Andrew’s excellent article Getting Ready for HTTP/2: A Guide For Web Designers and Developers.
What if I don’t want anything to do with HTTP/2?
One of the beautiful things about HTTP/2 is that it is backwards-compatible with HTTP/1.1. You can ignore it, and nothing will change.
And if your users are likely to use older browsers, especially on mobiles, then it makes sense not to upgrade.
However, as more servers and websites switch, your website could start to seem slower. And, as Kissmetrics has pointed out, 40% of users will leave a site if it takes longer than three seconds to load.
What do you think?
What do you think of HTTP/2? Are you hoping to implement it for your site soon?