Re: Including files

Brian Behlendorf ([email protected])
Thu, 9 Jun 1994 09:38:23 +0000 (GMT)


On Thu, 9 Jun 1994, Lewis Foti wrote:
> One extension to HTML that I think would be very usefule would be a
> generalisation of the <img src="URL"> markup. Ideally I would like a markup
> which would allow the inclusion of any file type e.g. <include src="URL">.
>
> This would allow html documents to include (rather than link to) other
> documents. An example of where this would be useful is where there are large
> amounts of frequently used text such as standard disclaimers that need to be
> included in all the documents available at a server. It would greatly
> simplify the maintenance of documents sholud the standard text need to change
> at some point.
>
> What sort of problems would the inclusion of an HTML document within another
> HTML document present to viewers?

Good question - when I say "view source", does it show <include
src="blah.html">, or simply the included HTML code itself? If just
the HTML code itself, how should the user be able to tell how this
included piece was referenced?

We should broaden this to address the whole notion of server-side
includes. One the one hand it would be very nice to have some
standardized format for this, so I don't have to worry about all the
includes in my documents being tied to a specific server
implementation. On the other hand, this is an issue that might be
better addressed at the server level - for example, all our articles
have a server-included copyright attached, and relying upon the
browser to include the copyright isn't good enough.

One idea is to leave server-side includes as they are, but allow
people to do as suggested above, a generic <include src="URL">
directive, and when the inclusion of more text is involved, the
browser commentizes the <include> tag, i.e. <!-- include src="URL" DONE -->
before the included text. (perhaps an <!-- end inclusion --> at the end)
Yet another way to approach it might be along the lines of
a MIME multi-part message, which we'll hopefully see support for in
browsers soon.

Brian