[whatwg] <include> element
whatwg.org at chsc.dk
Thu Apr 26 00:56:40 PDT 2007
Jonas Sicking wrote:
> The idea is basically an element like <iframe> but that renders the
> linked page, instead of inside a square area, in flow with the main
This is actually useful not only in Ajax-like applications like the ones
suggested in your example but also in more static pages as a replacement
for server-side includes. Client-side includes make it easier to make
sites that are made up data from different sources. Most developers
prefer to avoid server-site includes in favour of letting clients
request the resource directly.
Some sites may choose to serve the top-level navigation from one central
place, even though the site is made up of several subsites hosted on
different servers and platforms by different hosting companies. The
<include> element could be used to include the top-level navigation on
each of the subsites. Also, content from different subsites could be
aggregated on one overview page using <include>.
Ad banners are usually served from a seperate server. Banners with fixed
proportions are probably better served using an IFRAME, but e.g.
Google's text-ads may vary in size and could benefit from being a part
of the page.
In practice, the result effect is often achieved by wrapping your
include file in a document.write() and including this using script a
<script src="...">. However, this makes it harder to write these
includes by hand (you have to escape certain characters, ' " \ \n \r
\t), and debugging also gets more difficult.
More information about the whatwg