Re: HTML Include

by "Ted Temer" <temer(at)c-zone.net>

 Date:  Sun, 15 Aug 1999 10:44:07 -0700
 To:  <hwg-basics(at)hwg.org>
  todo: View Thread, Original
Ron:

Includes, or SSI for Server Side Includes is a rather large and
surprisingly complex subject. I am amazed at how many super sharp
ISP "tech" people give you blank looks when you bring up the
subject.

Therefore, I can only hit the high spots in a short message. So
here in no special order, are some chunks of info re: SSI:

An included file can be almost anything--it does not have to be
HTML. It could be an image, or as HTML is text, it could be a
.txt file and lots of others.

The big problem lies between you and your ISP. Do they have SSI
enabled--and even more important--what is enabled. For SSI to
work the server has to "scan" parse, your page to see if an
include or other SSI command is present.

Some ISP's are of the opinion that such scanning slows their
server down to a crawl. In truth this is mostly an old wives tale
BUT the process will usually result in the server displaying a
brand new copy of the page and not one that has been cashed. In
this respect, there IS a small amount of extra server activity.
But unless the server was getting thousands of requests, the
practical load increase would be un-remarkable.

I point all this out because some ISP's--in an attempt to keep
this extra server load as small as possible--set their servers to
only parse certain file types. Often they limit it to HTML files
with the extension .shtml  This means that all your files that
have an include command must be saved as a .shtml file. (And
remember, all the links must be changes to reflect the .shtml.

To exacerbate the problem, most automatic and text editors do NOT
save or "publish" .shtml meaning among other things, you are
forced to FTP the files. This would mess up FrontPage Extensions
for example and is one of the reasons they use their own method
to do this.

The generally accepted method these days "appears" to be that one
saves non-include pages as .htm and those having includes as
.html. This allows the ISP's to exclude .htm pages and the
editors to save and publish .html thus making everybody happy.
The servers can be set to parse, (scan) whatever the server
administrator wants it to.

Having said all that, there are still some ISP's that would
consider the above paragraph as heresy and refuse to take part in
such nonsense. Such ISP usually lose their FP, ASP, ColdFusion,
Etc. customers but of course, there are hundreds more to choose
from.

Here is a sample of the statement that is put into your page to
direct the server to include another file:
<!--#include virtual="links.txt" tag="body"-->
Please note that this command line can vary with different
servers and the way they are set up. The best way is to talk it
over with your ISP and go from there.

Again, that has only hit some of the high spots
Best wishes
Ted Temer
Temercraft Designs Redding, CA
temer(at)c-zone.net
http://www.temercraft.com


>FrontPage 98 has a feature called HTML Include that allows you
to point a
>"bot" to a separate HTML page (of your own) and have it show up
on the page
>you're editing.
>
>It appears that how this works is that it actually copies the
HTML into the
>receiving page, and writes a note to itself to keep track of
edits and
>update them.
>
>This is still somewhat useful, in that it reduces the complexity
of the
>page from the developer's viewpoint, and leaves the base page
there to be
>used elsewhere. I could imagine using the same source page in a
frame and
>non-frame version of a site, for example. But the pages get kind
of big and
>clunky, and are hard to edit in a straight editor, as they have
all this
>include stuff in them.
>
>Is there a viable technique with scripts or something to have
the include
>actually be done at the time the page is displayed, instead of
when it's
>saved (as it is in FrontPage)?
>
>Thanks,
>
>Ron
>
>Ron Jeffries
>Extreme Programming Training and Consultation
>ronjeffries(at)acm.org
>web pages: http://www.XProgramming.com, http://www.armaties.com
>pgp key: http://www.armaties.com/pgpkey.htm
>

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA