What is SSI?Your ISP server has information about visitors to your site from the referer URL included with your visitors file request. This is normally stored away in a log file. Most ISPs allow you to look at the log files. Note: Compuserve Ourworld, and some others do not allow this.
To test whether your server offers SSI you can put the following SSI command on a page on your website and if it just shows the Testing SSI: bit without any response you know it does not work for you.
Server Side Includes (SSI) are special commands which can be imbedded in your HTML code which tell the server that you would like some of this information on the display now.
What use is it?What are you are going to do with this information? There is a count demo below which could be good. And a date last modified.For the rest you can display the facts on the page that the visitor is accessing. Interesting but not very useful. JavaScript, Java or Perl have similar facilities and can process the information if you have a suitable program to do this.
Some restrictionsCompuserve Ourworld, and some others do not allow access to SSI or CGI. On other servers you can try the technique with a simple command to see whether this works for you. Or ask the Help Desk for assistance.Some servers require a specific filename extension for this to work. You will note that this page has a file name of ssi.html instead of the more usual .htm This is because the file uses SSI features, and these are only available on my server for .html files. Other servers may require .shtml extensions. Pages tend to load rather slower with SSI commands as the server has to parse the page and find out what SSI commands are included, and then execute them. You have to upload the file containing SSI commands to your server before you can test whether they work.
General FormatThe commands are placed within comment markers<!--comment--> so that they shall not be visible to the surfers if for some reason they are not operational today.
Include SSISSI can be used to include a standard file in a page with a single short command. The format is<!--#include file="text.txt"-->
I plan to use this technique to insert the boiler plate on the bottom of each of my pages. In this way I can keep just the one file of text up to date, and it will be automatically shown correctly everywhere.
Execute SSIThe hit-counter example accesses a CGI program, and is the same as the plain-number hit-counter on my entry homepage. The command is unique to the managers of my own server and is of the form<!--#exec cgi="/counters/usercount"-->
Echo SSIHere is the Echo command with some of the available variations. There a stack of other codes which I have not found useful for my work. They are listed on the Bignosebird site (below)
The commands are all of the form The most useful ones first:
You can configure the date format: full details of all the available codes are on the Bignosebird site (below)
This requires a pair of commands, for example: Facts from the access request packet:
Information from the Server (format of the command may vary)
|
Also see the tutorial on http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html
![]()
|
Website by:
Richard Waller Comments? Suggestions? Contributions? Please contact us |
Page |
Map |
URL: http://www.waller.co.uk/ssi.htm