[thelist] Re: Advisablitity of SSI

Diane Soini dianesoini at earthlink.net
Thu Sep 18 21:24:29 CDT 2003

I use SSI (the traditional .shtml kind as well as the .jsp kind). I am 
sure I do it "wrong" but the way I ended up doing it after a lot of 
trial and error is like this:

Each page of the site is composed of two pages:

And then there is a template.shtml.

page.shtml is the one the visitor calls in the browser. It contains a 
few lines of server-side code telling a template page what content file 
to include, which navigation (if any) to include, and any other 
parameters to pass. page_content.shtml (or whatever the suffix is -- 
could be .html, .cgi etc) contains the main content of the page.

The template contains the entire page structure with includes of its 
own, some of which are variables that are passed to it by page.shtml, 
and others that are common, such as the footer or the banner.

It's sort of lame to have two files (page.shtml and page_content.shtml) 
for every page. But I learned the hard way after having to edit every 
single page in the site many times over because I had done it the 
"classic" way I had seen described everywhere. That classic way is to 
have a page with a bunch of html and where the banner goes, the footer, 
the navigation etc there is an include. Well, every page not only had 
the same includes, they had the same skeletal html, so why not just put 
all of that in a template page and include the entire thing, telling 
the template what includes to include?

The nice thing with jsp is that the page is compiled on the server on 
the first request, and after that the server doesn't have to do as much 
work. For .shtml I suppose it is more labor intensive for the server, 
but nobody has ever complained that my site is too slow.


On Wednesday, September 17, 2003, at 12:01 PM, 
thelist-request at lists.evolt.org wrote:

>  In your experiences, what are some guiding principles for deciding 
> when
> to use Server-Side Includes to include common sections over multiple 
> pages?
This email comes to you via a funny, almost-Unix box named after fruit

More information about the thelist mailing list