2 ms·
HTTP/2 helps reduce the latency penalty that's one of the biggest constraints to HTTP/1.x performance. Sure we can work around this using techniques like CSS s
by youngtaff 12y ago
HTTP/2 helps reduce the latency penalty that's one of the biggest constraints to HTTP/1.x performance.
Sure we can work around this using techniques like CSS sprites, merging JS files, CSS files etc. but these are hacks that come with their own tradeoffs - most notably caching but also sprites bring memory challenges on some devices too.
Using a single TCP connection opens up some issues where there's packet loss but it also means the TCP congestion window will grow at it's maximum rate without the risks that opening multiple connections and domain sharding bring.
Multiplexing also offers interesting possibilities of partial resource download e.g. download part of a progressive JPEG, and then the rest later.
Push allows servers to send content e.g. CSS, fonts e.g. that's in the browser's critical rendering path before the client has even discovered it needs it.
Header compression reduces both the request and response overhead, and request overhead if often forgotten in web development which is funny as most connections have asymmetric speeds.
Prioritisation allows the browser and server to schedule content download 'more intelligently' than our current browser heuristics.
In a world where most people are looking at HTTP using DevTools, WebPageTest and Wireshark rather than the native text format a binary protocol isn't a problem.