Server Side Includes (SSI) Explained
Many webmasters agree that one of the most time consuming tasks of website maintenance can be making small changes to common elements like navigation bars. It is impractical to consider updating links on every page particularly on websites that contain a significant number of pages. To overcome this problem, you may like to use Server Side Includes (SSI).
SSI directives are used to employ the web server to perform tasks such as inserting files into your webpage or for displaying dates and times dynamically. To use SSI, create your navigation bar in a separate html file. Then, when you create your webpage you simply place the following code at the point where you need your navigation bar to appear:
<!--#include virtual="../directory/mynavigation.html"-->
When a visitor views your page, the server inserts the contents of mynavigation.html into the displayed page. Should you ever need to make any updates or alterations to the website navigation it is now a case of editing just a single file to instantly update the entire website.
Server Side Includes are also useful for giving a common look and feel to repetitive content that appears on multiple pages such as headers and footers. In order for SSI to work correctly, your web server must be configured for SSI support and all pages containing SSI directives must be given a .shtml extension. The server will not parse any directives included in pages with .htm or .html extensions.
If you are updating an existing site and changing .html to .shtml extensions, it is important to remember that any hyperlinks pointing to these files will also need to be modified in order to reflect these changes.
This article can be found at: www.getontheinternet.net/webmaster-tips/server-side-includes/index.shtml
[Updated - 29 March 2007]
Copyright © 2007 David Kaye – All rights reserved.
For more free webmaster tips and articles like this on website design, hosting and promotion visit http://www.GetOnTheInternet.net
Link to this article
If you would like to link to this article please copy and paste the following code into your webpage:
<a href="http://www.getontheinternet.net/webmaster-tips/server-side-includes" target="_blank">Incorporating Server Side Includes (SSI) in your webpages </a>
Click here to read more free website design and hosting hints, tips and advice
