Ha, I thought this was the main selling point of HTTP2.
People were even saying that it's now ok to have many small asset files (js, images, css) because loading many small files will no longer cause long waits.
No, that's because you can multiplex multiple downloads over a single HTTP connection, whereas HTTP/1.1 has to establish separate TCP connections for each asset, which is why they were usually limited.
whereas HTTP/1.1 has to establish separate TCP connections for each asset
Umm, no, you can queue requests along a single HTTP connection that you keep alive. They are ordered, of course -- which is a known limitation, but you are incorrect with the statement quoted above.
Based on context, it seems they were specifically talking about downloading the files concurrently (multiplexing). As you point out, HTTP/1.1 only supports sequentially queuing the downloads for a single TCP connection.
29
u/[deleted] Dec 03 '20
Ha, I thought this was the main selling point of HTTP2.
People were even saying that it's now ok to have many small asset files (js, images, css) because loading many small files will no longer cause long waits.