Server Side Include

The server-side include (SSI) facility supported by some web servers defines a special set of directives (comment tags) that are interpreted by the web server before the page is returned to a browser. A page that includes SSI directives is, in essence, a simple template.

Contrast this with approaches that embed scripting commands within the web page (e.g., ActiveServerPages, JavaServerPages, PHP).

One SSI directive causes the web server to include a file in place of the directive. For example:

        hi <!--#include file="bar.html"--> bye

[bar.html] there

would return to the web browser:
        hi there bye

Another SSI directive causes the directive to be replaced by the result of a command or script.

        the time is <!--#exec cmd="date"--> and all is well.

(The #exec directive isn't supported by some versions of PersonalWebServer.)

See Also: for a description of SSI support in Apache.

InternetInformationServer aspects

IIS can process ServerSideIncludes in non AspApplication mode. See

MicrosoftWebForms can take ServerSideInclude (refer, but there are advice in Wrox forums that use of class library assemblies is a better practice (see


EditText of this page (last edited May 5, 2005) or FindPage with title or text search