During the last few weeks you have probably heard about “http” and the presentation of HTTP / 2, and you will wonder: what is it all about ?. That questioning is important because it affects us all who use the internet to visit websites, and it is not something that only engineers can understand.
HTTP is just a set of rules that allows computers to transmit information, and what HTTP / 2 will get is that the web pages you visit load much faster. If you want to know a little more about the how and when, read on, because we will explain in detail, but in a clear, simple and direct Spanish.
Why is this important?
Uploading a web page in 2 seconds as opposed to 10 is not something that only has to do with convenience. Some studies indicate that 4 seconds is the maximum that the average person expects to load a page before being discouraged and going somewhere else. This implies that stores may lose buyers, blogs will receive fewer readers and overall the wait implies a significant added waste of time. That’s why it’s important to optimize sites to load faster.
In its day it was discovered that the “protocol” of information transfer can be improved in a significant way and that affects each and every one of us. HTTP has been used since the early 1990s, and specifically, the current version, HTTP / 1.1 has been used since 1999. That’s an eternity in terms of technology development, and luckily some Google engineers paid attention And developed something called SPDY (from the term “speedy” in English, which translates to “rapidito”).
During testing and implementation, which began in 2012, changes in SPDY transmission were found to improve site load by as much as 40%. That is why it was decided to formalize the changes by creating a made-to-order protocol, following the steps established by organizations in charge of internet standards, such as the Internet Engineering Task Force (IETF).
But what is a protocol?
Protocols are rules that computers use to communicate with each other. That is all. In this case, HTTP is the protocol used by web servers (computers in charge of hosting the pages you visit) to send information to browsers (such as Firefox or Chrome). This web protocol is part of a group of protocols known as TCP / IP, which takes care of establishing the connection between your computer and the router, pass the data to your internet provider and obtain information from the web server.
TCP / IP allows to use different protocols depending on the type of information to be transmitted. If you want to see a website, the first protocol to use is Ethernet, which is responsible for establishing your connection with the cable of the same name (wireless connections are achieved in a completely different way that we will ignore for now).Included in the Ethernet information packet are IP details, which allow data to travel thousands of kilometers across the planet to reach its destination. Each computer, in each house or building, has a unique IP number to communicate on the internet.
The IP packet carries within it details that establish communication, called TCP or UDP, and these in turn carry the HTTP information. If necessary, encryption (security) systems are then added, within HTTP, using the SSL / TLS protocol.
Why is HTTP / 2 better?
Another important change in HTTP / 2 is the use of compression, which simply avoids sending repeated data during the connection, in order to send less data in total. It is also important to mention that in HTTP / 2 the information is sent in binary, which is the native language of computers, unlike in text, that we use humans. By having to “translate” less, the computer can run faster.
The use of multiplexing, which allows to send and receive several messages at the same time also allows the communication to be optimized, and finally, a technology called “server push” causes the server to send information before the user requests it, To make it available immediately. To achieve this the server estimates what you will order before you do.
The tests show an improvement of between 10 and 40% in speed, with an average of around 30%. As we see below, the guys at HttpWatch have gotten a 20% improvement with no major complications.
Transfer with HTTP / 1.1
Transfer with HTTP / 2
When will we start using HTTP / 2?
In some cases, you may already be using it. Although the draft protocol was provided to the IETF just on February 11, some browsers have already implemented it, as have some servers.
Before 11 August the protocol must be ratified, to become a document called RFC (Request for Comments) or modified with a new deletion. If it becomes RFC, it becomes an official document. In any case, the RFCs are not mandatory implementation, as a law, but a suggestion for everything to work correctly.
Returning to the implementation issue, Internet Explorer already uses HTTP / 2 in the Windows 10 Technical Preview . Likewise, Firefox Beta 36 already includes support for the new protocol and Chrome also, although it is disabled by default (it is easy to activate ).
The Windows server, IIS, supports HTTP / 2 in Windows 10, while Apache and Nginx will soon include support (these two currently have extensions to use SPDY). All this means that very soon we will start using HTTP / 2, improving the speed of our connection, and we will not even notice.