[thelist] When to use SSI for your website

Katherine Spice k.spice at acu.ac.uk
Tue Sep 4 04:45:39 CDT 2001

Hi Shirley,

> I typically use it for site navigation, top mast, bottom footer and 
> copyright information.... anything that is repetitive like this.

This is *exactly* the kind of thing SSIs are good for. The only thing I would add (as a programmer rather than a designer) is that you can also include programs - for example where the values in a
select box come from a database - rather than make the entire page a cgi, include a program which prints the output. Eg,

<!--#include virtual="/cgi-bin/displaylocations.pl"-->

where displaylocations.pl is

$sql_query = "SELECT X,Y FROM TableZ;";
$query_handle = $dbh->prepare($sql_query);
print "Content-Type: text/html";

while (($key,$value) = $query_handle->fetchrow_array) {
	print "<option value=$key>$value</option>\n";


More information about the thelist mailing list