SSI
(Server Side Includes)
Server Side
Includes applied to a HTML document, provide for interactive real-time
features such as echoing current time, conditional execution based on
logical comparisons, querying or updating a database, sending an email,
without programming or CGI scripts.
An SSI
consists of a special sequence of characters or 'tokens' embedded within
a HTML page. As the page is sent by the server, the page is scanned
for special these tokens. When a token is found the server interprets
the data in the token and performs an action based on the token data.
All documents
containing SSI's must have the file extension .shtml
- this is necessary so that the server knows that it is this type of
file, and to parse through the document, find the SSIs and send the
appropriate information back to the client (browser).
The format of a SSI token is as follows:
<!--#'<tag><variable set>'-->
where
<!-- is the opening identifier
<tag> is one of the following:
echo, include, fsize, flastmod, exec, config, odbc, email, if, goto,
label, break.
<variable set> is a set of one
or more variables and their values and are dependent on the tag
--> is the closing identifier
However,
having the server parse documents is a double edged sword. It can be
costly for servers to perform parsing of files while sending them and
should therefore only be used where necessary such as having a last
modified date or a text counter.
Further
information on SSIs can be found at the
NCSA.