Now that you know what it takes to make SSIs work on your server, you
might be asking yourself, "What good are they?" Well, as you've surfed
around the Web, I'm sure you've seen pages that include the last time
they were modified, like the one in Figure 3.1.

Figure 3.1 : Including the last modified date on your Web page.

At the bottom of Figure 3.1, the date the file was last modified is
printed. If you try to look at the HTML source that produced this file,
you will see only normal HTML commands and the date displayed on the Web
page. I have deleted most of the HTML that builds this Web page, but the
HTML you should be interested in is on line 14 of the snippet shown in
Listing 3.2. It sure doesn't look special, does it? You can't guarantee
that the author just isn't changing the date manually, but I suspect
that an SSI is responsible for the date on line 14.

Listing 3.2. HTML including the last modified date on your Web page.

[prior HTML deleted]

01:
02:

Wanna suggest a topic? Wanna be
03: notified when new lessons are on line, or

The HTML that produced the line
Last Updated and Validated on September 17, 1995
did not require the author to change the date every time the HTML file
was modified. The SSI directive
[an error occurred while processing this directive]
checks the last modified field of the HTML file-file.shtml-and sends it
to the client along with the rest of the HTML in file.shtml. So, even
though I'm not responsible for the HTML in Figure 3.1, I suspect that
line 14 looks something like this:
Last Updated and Validated on [an error occurred while processing this directive]

Notice something very special about SSIs: When your server processes the
SSI command, it includes the result of the SSI command in your HTML in
place of the command itself.

That example is pretty simple, as are most of the SSI commands. And that
is their purpose: to allow simple dynamic additions to your HTML files
with very little effort. This example gives you a new perspective on
some of the neat things you can do with your Web page without having to
expend a lot of programming effort.