Re: SSI

by "Kehvan M. Zydhek" <kehvan(at)zydhek.net>

 Date:  Fri, 17 Mar 2000 18:22:31 -0800
 To:  "tim booker" <timbooker(at)lineone.net>,
"Harold A. Driscoll" <harold(at)driscoll.chi.il.us>
 Cc:  "Hwg Techniques \(E-mail\)" <hwg-techniques(at)hwg.org>
 References:  mallard
  todo: View Thread, Original
Harold,

As in your earlier reply regarding the ampersand character in the email
name, you spend a lot of time quoting the specs without giving links to the
spec or suggesting alternatives to alleviate the problem or answer the
question. I think it's great that you're on top of all the specs, myself,
but as most of us have learned through trial and error in page writing, not
all browsers adhere to the specs 100% (in fact, I don't know of any browser
that is 100% compliant with all the specs for all the different flavors of
HTML, CSS, JavaScript, etc.). If there is one, I must've missed it somewhere
along the lines!

Additionally, even though Windows98 was built from what was a 16-bit
operating system, rest assured that it is, in fact, a 32-bit operating
system. Sure, it has it's flaws (what Microsoft product doesn't), but it is
not 16-bit anymore.

Tim,

In answer to your question regarding the format of LAST_MODIFIED in an SSI,
I paraphrase from "Teach Yourself CGI Programming with PERL 5 in a Week" 2nd
Edition by Eric Herrmann, published by sams.net, pg 81-84:

flastmod -- Inserts into your web page the date of the last time a file was
modified
<!--#flastmod file="filename" -->

To configure the output, use the SSI config command:
<!--#config timefmt="arguments" -->

Arguments:
%a    Abbreviated weekday name, according to the current locale
%A    Full weekday name, according to the current locale
%b    Abbreviated month name, according to the current locale
%B    Full month name, according to the current locale
%c    Preferred date and time representation for the current locale
%d    Day of the month as a decimal number (ranging from 1 to 31)
%m    Month as a decimal number (ranging from 1 to 12)
%U    Week number of the current year as a decimal number, starting with the
first Sunday as the first day of the first week
%W    Week number of the current year as a decimal number, starting with the
first Monday as the first day of the first week
%w    Day of the week as a decimal number, with Sunday being 0
%x    Preferred date representation for the current locale without the time
%y    Year as a decimal number without a century (ranging from 00 to 99)
%Y    Year as a decimal number including the century
%H    Hour as a decimal number using a 24-hour clock (ranging from 00 to 23)
%I    Hour as a decimal number using a 12-hour clock (ranging from 01 to 12)
%j    Day of the year as a decimal number (ranging from 001 to 366)
%M    Minute as a decimal number
%p    Either a.m. or p.m., acording to the given time value of the
corresponding strings for the current locale
%S    Second as a decimal number
%X    Preferred time representation for the current locale without the date
%Z    Time zone, name, or abbreviation

Keep in mind that when using these arguments, the time and date reported
will be based on the current SERVER time, not the local client time, so if a
page was saved at 3pm March 17, 2000 Pacific time onto a server on the East
Coast, it would report (depending on the specifics of the server) an East
Coast time for Last Modified.

Example of the above coding:

<!--#config timefmt="%a, %B %d, %Y, %H:%M" --><!--#flastmod
file="filename" -->
(for a file last modified 3:14pm March 17, 2000)

Would report Fri, March 17, 2000, 15:14

Hope this helps!
Kehvan Zydhek

----- Original Message -----
From: "Harold A. Driscoll" <harold(at)driscoll.chi.il.us>
To: "tim booker" <timbooker(at)lineone.net>
Cc: "Hwg Techniques (E-mail)" <hwg-techniques(at)hwg.org>
Sent: Friday, March 17, 2000 12:39
Subject: Re: SSI


> At 13:05 17-03-00 , tim booker wrote:
> >How can I parse server-side include files for testing
> >on a local hard-disk? I'm using Win98 and IE5.
>
> Server Side Includes are a _Server_ function... so you'd need a
> corresponding Web server running on your local system. SSI has no standard
> format, but rather is specific to a particular Web server.
>
> Even within the limitations of the 16-bit operating-system wannabee Win98,
> you'll find that a number of Web servers will run, perhaps to a limited
> extent, with Win98.
>
> >Also, how can you control the format of the
> >date produced by LAST_MODIFIED, etc?
>
> The format of dates for HTTP is quite specifically defined in the HTTP
> specification (IETF RFC 2068). It is much more rigidly defined than some
> other date formats, such as that accepted for email (per IETF RFC 822).
>
> As to how you process them, that is entirely up to you. A number of Perl
> modules work with dates, for example, and several with the format used for
> HTTP dates.
>
> Safe computing,  /Harold
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Harold A. Driscoll                 mailto:Harold(at)Driscoll.Chi.IL.US
> #include <std/disclaimer>                 http://Driscoll.Chi.IL.US
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA