logoalt Hacker News

CamouflagedKiwi05/03/20252 repliesview on HN

That's the first thing listed in the article? "Javascript to go fetch the HTML and insert it". What they're after is something that's _just_ HTML and not another language.


Replies

j4505/04/2025

The <object> tag appears to include/embed other html pages.

An embedded HTML page:

<object data="snippet.html" width="500" height="200"></object>

https://www.w3schools.com/tags/tag_object.asp

show 1 reply
sreekotay05/03/2025

While you do need a server i think this is the functional equivalent? The fetch JS and insert outlined (linked to) in the article is async. This blocks execution like you'd expect an HTML include to do. It's WAY easier to reason about - which is why the initial ask, I think...