Using Server-side Includes
The hardest thing for me to do as a developer is to go from a rich environment like Domino to a regular web server with standard HTML files every where. Every time I think about doing something cool to minimize the administration of the site, the first thing that comes to mind is how to do it in Domino. Well, I have started to work with Server-Side Includes (SSI) while I have been redesigning the CGC Builders site I maintain for my brother-in-law.

For those of us who bleed yellow and black, you can think of SSIs as the subforms of the HTML world. Although SSIs do have a performance cost, the productivity gains will be similar to what you have seen with subforms. They can either be a static or computed link to a separate HTML file, like a footer that you want on all pages, or they can be a formula for showing information like the last time the file was modified. The first thing you will notice about sites that use SSIs is that their pages end in either a .SHTM or .SHTML extension. These extensions tell the web server to look for SSI code in the HTML. Once you have the extension correct, just add a line like to your code. The above line inserts the contents of the footer.html file at that point in the HTML. On the CGC Builders site, I have used SSIs for the header, navigation, and footer.

It is important to note that the files that are included are not complete HTML files, but rather snippets of HTML. They do not have HTML, HEAD, or BODY tags in them, since that would cause problems if they were included in other HTML pages. There are a number of web resources out there for learning about SSIs. Here are a couple of the pages I used:

If you find yourself doing plain jane web development, SSIs are a nice way to maintain sanity in a sea of HTML files.

<< Previous Document / Next Document >>
    Be the first in the world to comment on this entry!!!

Discussion for this entry is now closed.