Server Side Includes
Volume Number: 15
Issue Number: 8
Column Tag: Web Development
Server-Side Includes
by Rich Morin and Vicki Brown
Generating A Dynamic Appearance in Static HTML
A Desire for Consistency
We realize that static web pages are passé, but we still need to generate them from
time to time. We also like to have a certain consistency (and controlled variability) to
our web pages. So, we use server-parsed HTML documents, more commonly known as
server-side includes, to manage page headers and footers.
Server-side includes (SSIs) provide a convenient way to embed variables (such as the
current time, date, URL, or size of the current page) into any HTML document "on the
fly". SSIs can also be used to insert the contents of "boilerplate" files into the current
document. This makes them an excellent choice for storing common information, such
as Copyright notices, contact information, and navigation bars.
SSI support is provided by several of the common Web servers, including Apache
http://www.apache.org for Unixish systems, WebTen http://www.tenon.com and
WebSTAR http://www.starnine.com for Mac OS, and WebSite http://www.oreilly.com;
for Microsoft Windows. If you use a different server, consult your documentation to
see if it supports SSIs.
[Footnote: Tenon's WebTen 2.1.9 is a point-and-click Web server based on Apache
1.2.6].
A sample web page (as the user's browser receives it) might look as follows:
Sample web page as seen in the browser
Sample Web Page
Sample Web Page
Welcome to a Sample Web Page!
With some typical sample text...
Copyright 1999 Prime Time Freeware
Send comments, inquiries, or trouble reports to
HREF="mailto:www@ptf.com?subject=http://www.ptf.com/sample.
shtml">www@ptf.com.