|
Performance Issues
Before you decide to start using Server Side Includes you should be aware of the performance
issues involved. Basically, they slow down the loading of your documents.
On a standard server setup, SSI commands are off by default. When a document is requested
from the server, it opens the file and sends the contents back to the requesting browser. The
server does not attach any meaning to the contents, or even check that it is what you say it
is.
For instance, if you accidentally placed a sound or image into a file called
mypage.html, the server would neither know or care. It just supplies the file to the
browser byte for byte.
When Server Side Includes are enabled, the server has to work a lot harder. It has to look
at the contents of files and try to process them. Although it doesn't have to act on the
entire contents, it does have to search for and act on any special SSI commands the document
contains.
If the command is to include the content of another document, it has to open that document and
process it too.
All this searching and processing takes time - enough time to be noticeable to visitors.
You are going to have to decide whether the reduced development time is enough of a reason to slow
down the delivery of your pages.
Restrictions
There are also several restrictions on using SSI at Spaceports:-
- Location
- Any documents containing SSI commands and related files to be included must be on the CGI-BIN
server. (See the CGI-BIN section for restrictions inherent
in using that server.)
File names
- HTML documents containing SSI code must have an extension of .shtml for the commands
within them to be processed. Included files do not have this restriction, unless they too
contain SSI code (I haven't tried using SSI inside an included file, so I don't know if it works
here).
Commands
- As far as I know, the option to send server commands via SSI are not enabled (for security
reasons). Some of the less potentially harmful commands may be usable, though I haven't had
reason to test any.
|