[Proposal] Uri content addition mechanism

I might be misinformed, but as far as I’m aware there is not a mechanism defined by the W3C where a hyperlink in an anchor can be used to load extra html in an existing page without the use of (i)frames or JavaScript. Such a feature would however add simple, but very powerful usability to a website, whereas implementing this in the browser logic must be trivial.

A link as proposed could for example be specified as <a href=’http://linktoextracontent.html#targetId’ target=’_inline’ … . Using this structure, the browser should load the extra html requested as innerHTML of the element with id=’targetId’. Of course one has to consider cross-domain issues an one should possibly ignore the accidental misuse of some tags in the extra content (‘head’ and its content, ‘html’, ‘body’).

A complementary mechanism could allow late loading of parts of a page, again without the use of JavaScript. A tag or attribute ‘inline’ could cause a second load of content, after the primary content of the page is loaded. So this could be specified with something like <inline URL=’ http://linktoextracontent.html’ />.

Albert Jan

This sounds a lot like the ‘client side include’ discussed here: https://github.com/whatwg/html/issues/2791

Thank you for the reference. I think only the second (complementary) part is really the same. The link part could have the greatest benefit (The loading of extra/replacing content is initiated by the user clicking the link).