2 ms·
Well I'm not surprised. This is usually what happens when you take an existing protocol meant for a specific purpose and try to tack on additional functionality
by jongjong 2y ago
Well I'm not surprised. This is usually what happens when you take an existing protocol meant for a specific purpose and try to tack on additional functionality on top which has little to do with the original design goals of the protocol; you're almost always better off starting out with a low level protocol and going straight for your use case. In that respect, I think WebSockets already solved the problem of bidirectional communication elegantly.
In terms of reducing latency when loading deep file/script hierarchies, the <link> tag with rel="preload" or rel="modulepreload" is an excellent, simple construct.
- bawolff 2y agoHttp/2 was a new low level protocol and http push was never really about bidirectional communication.
- _heimdall 2y agoHTTP/2 Push would have fit the exact same use case as preload links with reduced latency. The whole point was for the server to send the content that should be preloaded as a header so it could be preloaded before the link tag was ever sent or parsed. This is less useful, in my opinion, for pages that support streaming but for any request that hangs until the entire HTML page has been rendered server-side could have noticeable gains.
- klabb3 2y ago> HTTP/2 Push would have fit the exact same use case as preload links with reduced latency. I’m no expert, but it sounds like this still breaks a lot of assumptions about the 1:1 request-response based protocol that http is. If there’s no request, headers are… inferred? And the determination of what needs to be sent requires the server to model relationships between resources, as well as infer user-agent behaviors. Anyway, I never looked into it deeply. But I always felt this was a massive complexity burden spanning browsers and servers, for essentially bootstrapping cache performance only. Given that websites often don’t even cache properly, don’t bundle their bloated JS, etc, there’s so much low hanging fruit that needs addressing first anyway. So I’m happy it’s dying. Bank for the buck is crucial, and complexity creep is suffocation.
- paulddraper 2y agoIs HTTP not bidirectional communication?