Answers Search Help
Boston University home page
Dreamweaver: Managing A Site
 
 
    Library Items
 
 
 
 
 
    Templates
 
 
 
 
 
 
 
    Site Strategies
 
 
 
 
    Server-Side Includes
 
 
 
    Also See
   
   
   
   

Server-Side Includes Overview

Server-side includes (SSI) are used to insert the contents of another file anywhere onto a Web page at the time the Web page is accessed by the visitor. Using SSI is very similar to using library items in Dreamweaver in the sense that they serve as a central location for storing and editing objects that are reused frequently on your site. Think of SSI as a web server utility that inserts a "library item" when the page is accessed by a visitor instead of saving and updating library items in Dreamweaver.

You may be wondering: if using SSI is so similar to using library items, and because library items are already so easy to use, why would anyone bother using SSI? To answer this question, let's look at an example:

  1. Your department publishes approximately a dozen news stories on your Web site each month. Each page uses Dreamweaver library items to include a navigation menu that links to the three most recent news stories.
  2. Each time you update the Recent News menu, you make the editing changes on your master library item, then allow Dreamweaver to update all the pages on your site that use that library item, and then you synchronize your site to upload the revised pages.
  3. In a year's time, if you use the Recent News menu library item on all your news pages, Dreamweaver will need to revise over 100 pages every time you update the library item. In 3 year's time, that number will exceed 400 pages that will need to be updated and uploaded every time you make a change to your Recent News menu.

Now let's look at the same scenario using SSI instead of Dreamweaver library items:

  1. You maintain your Recent News menu as a separate file on the server and use SSI to include that file within your page every time a visitor accesses that page.
  2. Each time you update the Recent News menu, you edit your SSI file and upload only the SSI file to the server.
  3. When your news archive grows to 400 pages or more, you still only need to edit and upload ONE file when you make a change to your Recent News menu.

As you can see, SSI is an attractive alternative to library items when 1) you expect to be reusing an item on many, many pages; and 2) your item will be frequently changing.

 

WebCentral Using Publishing Learning Training Consulting WebCentral
Answers Search Help
NIS  |  OIT  |  Boston University  |   January 9, 2007