3 ms·
There is some advantage in splitting it in that the page itself stays cached even as the comments change and the page doesn't need to wait for the comments to b
by zamadatix 4y ago
There is some advantage in splitting it in that the page itself stays cached even as the comments change and the page doesn't need to wait for the comments to be transferred to start rendering. You could keep this advantage with <iframe> if you really wanted to avoid JS though. It's a shame html imports died, they were a bit more lightweight.
- marginalia_nu 4y agoWhich advantage is that?
- atoav 4y agoCached pages load faster?
- marginalia_nu 4y agoIf you're just slinging static HTML, there's really not that big of a difference, and if it's a frequently accessed resource where a difference might be expected to matter, it will be cached regardless.
- danielheath 4y agoHilariously enough, that's no longer true in many parts of the world; according to firefox telemetry, on-device storage is frequently much slower than the network.
- brennebeck 4y agoDo you happen to have a link for that? It seems pretty counterintuitive given the state of modern PC hardware.
- danielheath 4y agohttps://bugzilla.mozilla.org/show_bug.cgi?id=1392841 https://bugzilla.mozilla.org/show_bug.cgi?id=1392841 is the bugzilla bug to enable the feature by default. https://simonhearne.com/2020/network-faster-than-cache/ https://simonhearne.com/2020/network-faster-than-cache/ has some discussion.
- 8n4vidtmkvmk 4y ago> the page doesn't need to wait for the comments to be transferred to start rendering. It doesn't. Browsers will happily render half an HTML page as it's streamed in. There's an interesting HTTP 203 on this. https://web.dev/shows/http-203/LLRig4s1_yA/ https://web.dev/shows/http-203/LLRig4s1_yA/ if you're interested.
- zamadatix 4y agoInteresting, will have to give that a listen. Thanks!