[Xitami] SSI

Marc Doigny xitami@lists.xitami.org
Sun, 16 Dec 2001 10:02:05 +0100


>Marc's idea to use a SCRIPT tag may be off the mark. That would
>seem to run on the Browser, not the Server. For a "Hello world",
>that might be cool, except a Win32 EXE won't work on Mac or unix,

The first (and most normal) use of the script is for placing javascript on 
the page.
The browser expects that what it reads from the file is javascript.
It's like an <img src= ...> tag, but instead of loading an image, it loads 
javascript code.

I use lots of <script src= ...> for including logo's, footers and so on on 
my pages.
When something changes, i only have to modify one sigle script and all the 
pages calling that script are modified accordingly. It's like CCS 
(Cascading Style Sheets).
For instance, place following code on a html page and look for the results:
<script src=http://www.idemdito.org/mailing.js></script>

Now the fine thing about it, is that the browser expects javascript code, 
whatever the extension is. If you call <script 
src="http://web.verfaillie.com/cgi-bin/c"></script>, Xitami will execute 
the code (AND NOT SEND IT TO THE BROWSER) and send the results to the client.

The only minus is that it takes longer to process a <script> (when the 
script is called for the first time) than a SSI because the script code has 
to be fetched from the server. For the subsequent calls, the browser cache 
is used.


>and Win-users may object to running your (possibly malicious)
>code on their machine (I don't think any Win browser actually
>will run an EXE as a SCRIPT).

Xitami won't send the code to the clients if the code resides in the 
cgi-bin derectory.


Marc

------------------<Mailserver VERFAILLIE BAUWENS>------------------
Alle uitgaande mails gecontroleerd op virussen door onze mailserver
Virusdefinities dagelijks aangepast.  -<postmaster@verfaillie.com>-