6 ms·
I think this issue better addressed in HTML spec. Basic functionality to include html snippets files in other HTML files should be standard. What am I missing?
by animex 2y ago
I think this issue better addressed in HTML spec. Basic functionality to include html snippets files in other HTML files should be standard. What am I missing?
- nkrisc 2y agoHow would that work? Now one request for a page becomes N requests for every bit of HTML the client needs to render?
- lmz 2y agoYou could cache the intermediate bits. Hell you could do this right now (somewhat) by doing script src=menubar.js and the script containing document.write calls. Not great for performance.
- chefandy 2y agoThat’s sorta the case with frames and asynchronously loaded stuff anyway though right? I think they just consider the problem solved in practice through scripting and frames. Besides, HTML doesn’t have room for that— they need room for all the features nobody uses and cares about. XD I’ve been writing HTML to some extent for 30 years and I periodically come across shit— not even new shit— that I swear I’ve never even heard of.
- nkrisc 2y ago> That’s sorta the case with frames and asynchronously loaded stuff anyway though right? Yeah, and that's not something to emulate. And if so, it sort of already exists in the spec: iframe.
- chefandy 2y agoI’m not sure how it could possibly make the problem worse if the problem is already endemic to modern websites in a form far more heavily used than that ever would be.
- chefandy 2y agoWell, the HTML spec is missing that, has been for decades despite people asking for it, and to my knowledge has never even made it to a roadmap.
- toyg 2y agoIt is - it is called frames.
- johnchristopher 2y agoWouldn't that just ends up re-inventing XML and <xsl:include> ?