You have a stack of HTML pages with some content that's common to all of them. How do you fix it to store the common content in one place and reference it from each page? Several answers, pick one you like...
External Javascript file
eg: [tt]<script language="JavaScript1.2" src="menu.js"></script>[/tt]
The script in question outputs the necessary content to that point in the document. This is a straightforward technique that does not require any special facilities on the server. If your Javascript is up to it, the scripts can be as sophisticated as you like.
The major disadvantage of this approach (and it's a biggie!) is that not all surfers have Javascript switched on - these people won't see your common content at all. Included in the Javascript-challenged are most search engine spiders, so if you rely on this method to display your navigation menus there's a good chance that many of your pages will not make it into search engines.
For this reason, I recommend you not to use this method for critical content. It
is useful for content that itself requires javascript to work. On
for example there's a drop-down box that only appears if you have javascript enabled. It could have been included in plain HTML, but since it only
works if javascript is switched on it's a handy method for hiding it from luddites and spiders.
Server Side Includes
These are instructions to the web server to include the contents of a particular file at a particular place in a served document. The file in question can actually be the output of an executable script in your cgi-bin rather than a fixed file if you prefer.
Processing SSIs adds an overhead to the serving of files, as the web server has to parse the HTML file for SSI instructions before it serves it. This is one of the reasons some providers (especially free ones) do not permit you to use SSIs. It's also why most servers are set up to look for a special extension - generally .shtml - to distinguish files which need to be checked for SSI commands from those that don't. You can, however, force the server to parse all files by putting appropriate instructions in a .htaccess file.
The big advantage of SSIs (and other server-side solutions) is that the page your visitor sees is pure (X)HTML, the browser (or spider) has no extra work to do, and is unaware that parts of the page it's looking at were generated by SSI. See faq253-3309 and faq253-2000 for more information on SSIs.
ASP, PHP, etc.
I've not used ASP or PHP, but my understanding is that they're programming languages that allow you to embed scripts and instructions into HTML pages (or chunks of HTML into your scripts, if you prefer to think of it that way!). As such they're more powerful than plain SSI, but potentially more complex too. Again there's a small overhead in serving this type of file, again not all providers allow it. These approaches share the advantage of looking like plain HTML to the browser.
CSS
Not sure whether this is what iSeriesCodePoet is driving at, but you can (in theory) use the CSS2 [tt]content:[/tt] property to define limited standard content from within a style sheet. You can read more at
.
Like Javascript, CSS relies on the client being able to do the work. AFAIK
no current browser properly implements the content: property.
Other Approaches
If you're using Dreamweaver, I believe you can create template documents that generate your .htm files with the standard content in place. If you change the standard content, you have to re-generate the .htm files and upload them all to your server, but this approach has the virtue of requiring no special facilities on the server, and no extra overhead when serving the files.
Another approach might be to use images and server-side image maps, though this method has significant drawbacks with accessibility and should be used with caution.
Conclusion
"What I want to know is whether SSI's ... are the best/only way to go"
Not the only way to go, but certainly one of the best.
-- Chris Hunt