Re: Server side includes

Ian S. Graham (igraham@alchemy.chem.utoronto.ca)
Wed, 7 Feb 96 14:19:03 EST


From: "Ian S. Graham" <igraham@alchemy.chem.utoronto.ca>
Message-Id: <199602071919.OAA00779@alchemy.chem.utoronto.ca>
Subject: Re: Server side includes
To: philipp@res.enst.fr
Date: Wed, 7 Feb 96 14:19:03 EST
Cc: www-html@www10.w3.org
In-Reply-To: <9602071944.ZM12250@jones.res.enst.fr>; from "Philippe-Andre Prindeville" at Feb 7, 96 7:44 pm

> I've noticed that books don't seem to be very
> consistent about the syntax of server-side includes.
> 
> One sees:

The first one is correct.
  The idea is to place the entire include command within a comment -- 
  then, if the document is served out by a server that does not support 
  server-side includes, the include command is commented out and is 
  ignored.  Most browsers understand a coment to start with 
  <!-- and end with -->. Therefore the format

     <!--#config timefmt="%d %b %Y"-->

  is correct.  The form 

     <!--#config timefmt="%d %b %Y">
  
  is wrong, as the comment is unterminated -- if the document is 
  *not* parsed by the server, then the user agent sees the <!--,
  and everything after the <!-- is  treated as a comment, and is 
  not displayed.

Ian
--
Ian Graham .................................. igraham@hprc.utoronto.ca
Information Commons                           Tel: 416-978-4548
University of Toronto                         Fax: 416-978-6110

> <!--#config timefmt="%d %b %Y"-->
> 
> or
> 
> <!--#config timefmt="%d %b %Y">
> 
> sometimes even both in the same text (e.g. Mary Morris's book).
> 
> Which is right?  I suspect the later...  Indeed, the former
> causes some servers to gobble the file to the next comment or
> the end of the document.
> 
> In any case, I couldn't get the CERN server (1.3) to change
> the timefmt when doing a <!--#echo var="LAST_MODIFIED"-->...
> 
> -Philip
>