Dajbych.net


Internet Explorer starts supporting HTTP/2

, 3 minutes to read

http logo

Internet Explorer 11 in Windows 10 Technical Preview supports HTTP 2.0, now called HTTP/2. However, this is not some shallow term, like the previously so popular Web 2.0 that marketers used to use when they wanted to express "Myslíme si, že umíme psát weby lépe, než vy." It will bring faster page load times and new information will appear as soon as it is available. And if browser manufacturers succeed in enforcing this, all traffic will also be encrypted.

Speed

Because it can take a while for the server to output the requested data by the browser, browsers open up to 4 TCP connections to speed up page loading. This, on the other hand, puts more strain on the network because more connections are open than are actually needed. HTTP/2 therefore supports sending several files at once over a single connection.

Another improvement concerns compression. On the one hand, headers are also compressed, but support for new algorithms such as PeerDist or SDCH should also be added.

No less interesting is the effort to mitigate the problem of head-of-line blocking. TPC provides us with an abstract reliable connection over an unreliable electromagnetic network. Each document is chopped into packets, which are sent through the network separately. If a router sends packets from two input channels to one output channel, it may happen that not all of them fit in the output channel. We all know the effect from the D1 motorway. While the car on the road simply stops and waits, the electrical voltage in the wire is either there or it is not. It’s as if every motor vehicle that comes to a complete stop on the highway just disappears suddenly. This would ensure smooth traffic, but the driver would find himself with his missing car in the garage from which he originally left, and would have to make the whole journey again. That’s how it works in the TCP protocol. Because TPC also ensures that all packets arrive in the same order, a delayed packet prevents all subsequent packets from being read.

The HTTP protocol has a property called multiple requests that allows a client to send multiple requests in a single TCP connection and expect multiple responses. This saves the number of connections, but at the same time means that the second answer cannot outpace the first, even if it reaches its destination before it.

Safety

Since HTTP/2 is based on SPDY, TLS 1.2 encryption is mandatory. However, this is not entirely sufficient, as it also includes RC4 and Triple DES ciphers in CBC mode, which are not considered secure. Soon, this will hopefully be solved by TLS 1.3, which already prohibits weak encryption.

Bidirectional

At this point, you may think that we actually have WebSockets for this. You're right, we do. HTTP/2 is a combination of SPDY and WebSockets. It takes multiplexing from SPDY and the transport layer from WebSockets. The server can therefore send a message to the client in a similar way as it does today via WebSockets. But how do I do this while ensuring backward compatibility? The answer is simple – SignalR.