Server Side Includes (SSI) is a feature of CGI (embedded in your server) that enables you to dynamically insert a piece of information (including the current date, text file, and HTML file) onto any Web page. The browser, either Netscape Communicator or Microsoft Internet Explorer, displays the inserted code as if it was hard coded onto that page. For example, if you are interested in displaying the current date and time on your Web page, add one simple SSI code onto the page: <!--#echo var="DATE_LOCAL" --> SSI empowers your Web pages to be more responsive and make maintaining your site an easier task. So, instead of manually editing your Web page and change the date to the current one each and every day. What do I need to use SSI on my site? Every account supports Server Side Includes automatically!
That's great; What other options can I use SSI for? Now, you know what SSI can do. Here are some other useful options you can do with SSI:
The result is the following:
The SSI code for this is: Put that code inside your Web page, and your-file.htm shows up in the specific place where the SSI code inserted. The file doesn't have to be a ".htm" file. It could also be a ".txt" file (ie: your-file.txt, your-file.inc, your-file.text). So how is this useful? Let's say you have a piece of information that is repeated on many pages of your site (a navigational bar, for example). By saving that piece of information as an individual html or text file, and using SSI code, updating that piece of information becomes merely changing that ONE file. Moreover, the changes is instantly reflected on all pages containing the SSI include command. So, instead of manually editing all the pages, updating your-file.htm will save you a tremendous amount of labor time.
Here is an example of a cgi script called using the above SSI code: For an extended Server Side Includes Tutorial, click here.
|