^^Html import Html?
2016
- no.
- 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?
-
http://www.smartwebby.com/web_site_design/server_side_includes.asp
Google SSI or php include
2024
-
https://web.dev/articles/imports Last updated 2013-11-11
- la soluzione specifica e'
https://webmasters.stackexchange.com/questions/127482/on-what-specific-grounds-were-html-imports-rejected-deprecated-and-removed
- 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:
- <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
- shrink wrapping the size of the frame
to its content is tough,
- extremely frustrating to script into/out of, nearly
impossible to style.
- AJAX - I love
xhr.responseType="document"
, but you're saying I need JS to load
HTML? That doesn't seem right.
- 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.