W3C home > Mailing lists > Public > www-html@w3.org > August 1998

Re: include facility in html

From: Robert Woolley <ao472@freenet.carleton.ca>
Date: Sat, 29 Aug 1998 10:25:55 -0400 (EDT)
Message-ID: <35E80FEB.B95C519F@freenet.carleton.ca>
To: Marty Landman <marty@catnmoose.com>, "www-html@w3.org" <www-html@w3.org>
Marty Landman wrote:
> >Jed Hunsaker wrote:
> >It would be very useful to be able to embed HTML just like any WAV or
> MIDI >file. I know it's already available for JavaScript as a js file
> but I still wonder why >not HTML? If I use a footer on every HTML page
> and I want to edit it, I have to >go to each HTML page and edit it one
> by one.  I should be able to just edit one >file called footer.html.
> embed src=footer.html, that simple. I'm sure it couldn't be >all that
> tedious.
> I agree in spirit... the ability to include text w/o actually coding it
> would be great.  As it is now I use SSI with Perl to get that effect on
> my web site.  I'm wondering if in fact there are issues preventing this
> kind of facility up to now.  It seems like such an obvious thing to do I
> wonder if there's a good reason it hasn't been done!
> Unfortunately the alternative is the proliferation of other
> methodologies which just causes headaches for developers IMHO.  That is,
> HTML is the starting point of web content and as such the W3C is in a
> position to affect the cleanliness of implementation to a  greater
> extent on the part of user agents than anyone/thing else, again IMHO.
> So why isn't there a tag for including text in html code?
> --
> Marty Landman     ICQ#5999387       http://www.catnmoose.com
> --- use Cat 'n Moose's Web Safe Color Analyzer ---
>   >>    http://www.catnmoose.com/wsc.shtml    <<

There is the option of "Javascript includes"

Basically you create a .js file which contains all of the repeatitive
in separate variables. Then you document.write it to the user.


	<script src="redundant.js" language="Javascript">
	<script language="Javascript">

Then the redundant.js would contain:

	txt = "<h1>Hello World</h1>";
	txt += "<p>My name is <b><i>Rob</i></b>";

Unfortunately older browsers (2.0 and lower) will not show the HTML
they do not support external Javascript. Search engines will not pick
up either. What can be done is only encapsulate layout elements in the
javascript source files. That way your content is still visible to
Netscape 2.0,
etc. users as well as the search engines.

For more information, please feel free to contact me,

Received on Monday, 31 August 1998 05:18:43 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:48 UTC