Re: Server side includes

Ian S. Graham (
Wed, 7 Feb 96 14:19:03 EST

From: "Ian S. Graham" <>
Message-Id: <>
Subject: Re: Server side includes
Date: Wed, 7 Feb 96 14:19:03 EST
In-Reply-To: <>; 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 Graham ..................................
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