HTTP/2: It Will Improve The Speed of Your Browsing without You Have to Do Nothing

Only a few still write it to enter the URL in the browser, and those few are looks of disbelief: can that the HTTP standard, or Hypertext Transfer Protocol passing increasingly unnoticed because we take it for granted everywhere, but it has been underway since 1997 and continues to be the central pillar of web communications.

And now, this Protocol is on track to be modernized with its second major version: HTTP/2. We have been years ahead of it, knowing that their main advantage will be the speed with which we will be able to load web pages, but how it will work exactly and what will be the real speed improvement?

The HTTP standard: lesson express

Let’s do a quick overview of how the HTTP standard, since it is “the indivisible atom” of the web: a customer (you, with your web browser open) asks a server load on a web page by writing a web address in the browser. The server receives that HTTP request, and you’ll hear a response that is to load the HTML files of this website together with any other runtime behave this load.

In addition to this website, the server load It also responds with a status message that indicates if all has gone well, or if an error has occurred. Surely you recognize the status message 404 that indicates a failed to load for not having found nothing, or the recent controversy of the error message with the new code 451 who want to be attributed to the failure of load “for legal reasons”, surrounded by criticism of censorship.

HTTPS is not more than the standard HTTP with SSL encryption above layer, and is what now require the vast majority of online services

If the HTTP standard add you a layer of security by SSL protocol We get HTTPS, It is not more than the standard HTTP with a cipher that does that no one can read the data moving between requests that sends the user with your browser and the server responses. In Quiviger we detail it thoroughly, and it is a security measure that the vast majority of online services already considered essential.

HTTP vs HTTP/2: what is what changes?

The short answer is the speed at which. We go with the more elaborate response: HTTP/2 is based on SPDY, a protocol presented in 2009 by Google intended to speed up the Web. At the time spoke of 22-60% speed of loading of the conventional websites and an increase of the 39-55% in the case of websites with SSL. Here you can see the final specifications for the new standard.

How can such a significant speed increase? As multiplexing requests receiving servers by users and their web browsers. IE: those servers meet several requests at the same time. That also saves on number of connections, releasing working servers. This chart explains it well:

In addition the servers You can be proactive: recognize what type of client (web browser) has sent a request and, in addition send the answer you need, send also answers with data that already knows that the browser will need until this ask them in a new request. For example: while HTML we need to first load all HTML from the web then load your content (CSS, images), with HTTP/2 can load all that content at the same time that the same HTML based.

For developers, perhaps the novelty than they will notice is the of the frames. We went from the structure of header and body in HTML to divide it all in “frames” binaries, which are portions of code identifiable as those header and body that can be sent before the server sends the response of the HTML element that has been previously sent. This also helps to better compress the contents of headers, which in turn facilitates more rapid charge of all data.

Encryption is perhaps the novelty that has brought further discussion: HTTP/2 is ready to accept requests encrypted (in the same way that already makes HTTPS), but will not be something completely compulsory as they asked for many users. What will really happen is that most modern browsers (including Safari, Firefox, Chrome, Edge, Internet Explorer and Opera) will only accept communications HTTP/2 if they are encrypted, so that although it will not be something strictly required that practically it will make that all developers implemented this encryption want or not. The EFF is already doing steps so that to do so is not too complicated.

Okay, and this saves much time?

Here’s a demo live from Besthostnews:

While the globe uploaded HTML 1.1 took 20.8 seconds to load with a 271 milliseconds latency, the same balloon has taken 6.67 seconds to load with HTML/2 with a 0 millisecond latency.

This another demo of Cloudflare (that can test yourselves here) varies in its results, but the load in seconds of a small web module that lists the company’s servers takes as 3.5 times less in charge if we do it with HTTP/2.

Finally, this other more complex demo of HTTPWatch us detailed aspects of HTTP/2 is where we find the improvement: while the number of connections is more or less the same in HTTP, HTTPS and HTTP/2, load time is some less HTTP/2 millisecond: from 988 to 772:

When will start working HTTP/2?

Well now, it begins to have some web traffic optimization services that already implement some (only some) of the novelties of the standard HTTP/2 as for example the ability to respond to requests from clients before even these send them. Chrome and Firefox, the most widely used desktop browsers, are ready to accept the standard in its entirety. Safari and Microsoft Edge are working to do so in the future.

Save a second load on a website does not seem much, but it is a significant improvement

Only that change, according to the CEO of CloudFlare Matthew Prince, can do that within a year we will see how saved us a second whenever we load a web. Do you think it’s bit? In terms of download files you can make a very large difference. Accumulated benefit could be talking of 31,000 years saved each month.