4.2.2.1.3. How to benefit from SSI

After we have learned how SSI works and how you might configure your web server, we want to figure out what we can benefit from SSI.

SSI allows you to alter the content of static web files. The file's content is static when it is read on the server's file system by the HTTP daemon. However, the content is changed due to the execution of the SSI commands.

We have identified the following more or less useful purposes:

  1. A file contains only a single SSI directive, that executes a CGI script. It might look like:

    <!--#exec cgi="/cgi-bin/homepage.cgi"-->

    The output of the CGI script must contain a complete web page, because the file parsed does not contain any other content than the SSI directive.

    The HTTP daemon needs to parse the file before the CGI is executed. This two step process consumes a lot of computing resources. We don't see a benefit of this use besides the hiding of the CGI script execution due to a URL like "http://www.example.foo/path/index.shtml".

  2. If a web page shall contain some content that shall be adapted to the browsers' capabilities, then a file may contain common HTML code and one or more SSI directives to include the browser dependent parts. In order to generate these browser dependent parts, you need to execute applications or CGI scripts. So, what is the real benefit of combining SSI directives and applications that generate only parts of web pages? Well, we don't see a benefit, because the applications or CGI scripts can also generate the whole web page by using a very similar static HTML template.

Copyright © 2001-2003 by Rainer Hillebrand and Thomas Wierlemann