|
| People | Departments | Search UMD |
| |
What is meant by Server-Side Include? What is a Library Object? Both are powerful tools that have their place in a web site, but like anything else both have limitations.
A server-side include is a line of code added to a web page by you that tells the web server to add code from another file when the page is sent to the browser. The code may be HTML, javascript, etc. Normally you don't see this code in your page until you view it through your browser from the server (Dreamweaver has the ability to display includes while you work on the page). The logo (header) at the top of this page and the footer information at the bottom are both included by the server when your browser requested this web page.
A library object may be thought of as a local server-side include. The library object is code added to a web page by you that brings in code from another file, but it is done by Dreamweaver while you're working on the page on your computer. When you upload the page to the server, the code from the library is already embedded in the page. The "Dreamweaver Navigational Links" section at the bottom of each page in this workshop is a single library object.
Both a server-side include and a library object allow you to easily manage site wide or often repeated elements in your web design. In other words, repetitious stuff makes a great candidate for the power of these two tools. By changing the code in one file, many files can be automatically updated with the new code.
How do I make the decision on whether to use a server-side include or a library object? I determine if the code to be added is a global or local event, and then I use ssi for a global event and library object for a local event.
Global events happen outside of my control. I may have an influence on them, but others are involved in the decision. The ITSS header includes a table cell constraining the width of our pages to fit within a 640 wide pixel window. If the decision is made to increase the width to fit in an 800 wide pixel window, the server-side include can be modified and my pages are automatically updated - I don't need to do anything. If a battle ensues over the proper width or whether the page should be constrained, I don't need to worry. The page will reflect those decisions as they are implemented (note: this scenario has played out - the pages are no longer constrained as of 4/13/00).
Local events I control. In order to keep my web pages loading as fast as possible I'll use a library object to embed items in multiple pages, and then upload the affected pages. I'm not as likely to get into a extended battle with myself and go back and forth on decisions so uploading the affected pages does not bother me.
When you're ready, move on to "Making and Applying a SSI."
| Did you find what you were looking for? YES NO | |
| ©2003 Regents of the University of Minnesota. All rights reserved.
The University of Minnesota is an equal opportunity educator and employer. Last modified on 04/22/02 | Contact ITSS | Privacy |