^^Html import Html?

 

2016

  1. no.
  2. You can use a Server Side Include to load a menu or something in a div on your page. That way you don't have to use frames.
    Is that what your looking for?
  3. http://www.smartwebby.com/web_site_design/server_side_includes.asp
    Google SSI or php include

2024

  1. https://web.dev/articles/imports Last updated 2013-11-11
  2. la soluzione specifica e'  https://webmasters.stackexchange.com/questions/127482/on-what-specific-grounds-were-html-imports-rejected-deprecated-and-removed
  3. soluzione generale in una nuova architettura https://htmx.org/

 

Why imports?

Think about how you load different types of resources on the web.

For we have
JS <script src>
CSS your go-to is probably <link rel="stylesheet">
images <img>.
Video <video>
Audio <audio>

Get to the point!

The majority of the web's content has a simple and declarative way to load itself. Not so for HTML.

Here's your options:

  1. <iframe> - tried and true but heavy weight.
    An iframe's content lives entirely in a separate context than your page. While that's mostly a great feature, it creates additional challenges
    1. shrink wrapping the size of the frame to its content is tough,
    2. extremely frustrating to script into/out of, nearly impossible to style.
  2. AJAX - I love xhr.responseType="document", but you're saying I need JS to load HTML? That doesn't seem right.
  3. CrazyHacks- embedded in strings, hidden as comments (e.g. <script type="text/html">). Yuck!

See the irony? The web's most basic content, HTML, requires the greatest amount of effort to work with.

 

iframe = inline frame.