Logo Your Web Hosting Solution
Line
SSI Tutorial
Introduction
Using Variables
Including Files
Execute Scripts
Validate SSI
Tutorials Index
Home Page
SSI Tutorial - Including Files

The ability to automatically includes files into web pages can greatly reduce a webmaster's workload.

Say you have many web pages which all use the same text on them. As it happens, that text changes often.

You would either have to manually update all pages, or do a global search and replace. Quite a bit of work.

Server Side Includes (SSI) enables webmasters to store this text in a single file and update only one file.

<!--#include virtual="filename.html" -->

Simply replace filename.html with the filename which contains the changing text and add to your web pages.

Next time the text changes, update filename.html only and you're done. Quick and easy, saves lots of work.

SSI can include more than just text, you can also use html tags in the file(s) to be included with SSI.

This is where Server Side Includes get interesting. Say the navigation on a site is the same on all pages.

If the background color has to be changed, you need to update all pages. Using SSI, simply include one file (a header file) which displays the top part of all pages.

<!--#include virtual="header.html" -->

Now, you can simply update one file and see the background change on all the pages on your web site.

Top Of Page 
Line
Copyright© 1996 - 2024 Clockwatchers, Inc.