Where you had found this site?
 Search Engine
 Newsgroup
 School/Study
 Website
 Magazine
Details: 
(in magazines, please enter issue and page)

  Further survey: OpenWebSuite.org survey
 

Home | Contact | Imprint | German
 

Dynamic Internet Pages

If the number of your own Internet pages grows and grows, it becomes more and more important to maintain your offering efficiently.
For instance this desire pops up if you have to change something in your navigation scheme and therefore a lengthy, annoying, and error prone search and replace process starts. This may work pretty well with editors allowing multi-line and multi-file searches (e.g.HTML-Editor: (X)HTML-Format) and a good Online-/Offline-Link-Checker (e.g. WebAnalyse [web analysis]), but this is not state of the art.

Also frames are not the solution, because (especially when using screens with a low resolution) the navigation will be truncated, or an ugly scrollbar appears between navigation frame and content frame. And this are only two of the many disadvantages of a design using frames.

A nice solution provides Server Side Includes (SSI). SSI offers the possibility to store repeatedly occuring HTML-Code in centrally maintained include files. By that it is possible to seperately store e.g. a fixed header, the navigation, and/or the footer of an internet presentation and than include it easily into each page via SSI.
It is only needed to include directly in front of the content section the comment
<!--#include virtual="./header.shtml" -->
and to include directly after the content section the comment
<!--#include virtual="./footer.shtml" -->

In addition the internet page must be stored with the .shtml file extension, to tell the server, that the file contains Server Side Includes (SSI).

If the page is now called to be presented via a Browser, the server inserts at the comment positions the content of the centrally stored include files and submits the modified page to the browser for presentation. The user is not aware of this process, he/she only sees the final result.
It is even possible to nest include files (an include file itself contains includes). By that you may include advertisments into the header or your navigation section.

By the way, this page is composed using this aproach. If a link has to be changed, only the related include file has to be edited and the result is immediately visible on all pages of the Internet presentation.

To ease the maintenance even more, store most of your include files not in the directory, your .shtml-files are stored, but into a centrally maintained include directory. This makes your maintenance task really simple.

As SSI is not a brand new but a sound technology, most of the servers of Internet hosting companies support it. Only very few hosting companies do not support this technology or ask for an extra fee to enable it. If the documentation, your hosting company provides to you does not mention SSI, you have to contact the hosting company to get the details.

Best regards
  Christian Diekmann

All rights on this tutarial belong to Christian Diekmann. You may reuse and distribute it only with written permission of the author.

 
Home | Imprint
SourceForge.net Logo