I learned of SSI (Server Side Includes) long before I built my current site. Since it seemed
only way to go, I checked it out once again for
new site to be. What SSI amounts to is creating a new page for any elements common to all pages on your site. Then ask
server to include these pages whenever main pages are requested.
For example, build a regular HTML page containing all
content, including graphics, as is often used in
left column of a page as
basis of navigation. Then, instead of adding this content to each page, simply include
file. And hey, it's super. If you need to make a change, you make it only once, instead of on every page on your site.
SSI Slows Page Downloads?
What prevented me initially from using SSI were notes I read regards increasing page download time. Each page using included files needs to parsed (read) by
server to find any files to be included. Being an absolute fanatic about minimizing page download speed, I passed. Bad mistake.
Updating Multiple Pages Chews Up Time
Six month later, changing a single menu item was taking hours. I decided to ignore
page download time and go. But I ran into another snag. Pages with includes need
SHTML extension, else
server won't parse them. (An S in front of HTML.)
Switching From HTML to SHTML Busts Links
Nuts. I already had lots of incoming links. Since I didn't want to bust them by changing file names, I passed once again.
I had heard people speak of ways in which a server in some cases could be instructed to treat HTML pages as SHTML pages. But I didn't check it out. Another bad mistake.
The Perfect Solution
Many months later I ran across
following code. Add these lines to
top of your .htaccess file, and all existing HTML files will be parsed just as if they had
.SHTML extension. Neat. No changes in file names, which means no busted incoming links.
Options Includes AddType text/html .html AddHandler server-parsed .html
.htaccess is a hidden file in
root directory on your server. It is helpful in doing many things, and can be located elsewhere as needed, but for now let's focus on
above.
In WS_FTP, when you type -al into
blank field to
right, this file name will become visible. The best plan is to download
file, add
above code, then upload and overwrite
original. (The reason for downloading first is to be certain you hold whatever
file may already contain.)
Creating Files
What I did next was create a file, yleftnav.html, containing all
content in
left column of a page. Then on each page, I replaced
content in that column with
following.