lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV document date


From: Foteos Macrides
Subject: Re: LYNX-DEV document date
Date: Tue, 19 Nov 1996 09:57:26 -0500 (EST)

Albert Yale <address@hidden> wrote:
>i'd like to know if lynx has the ability to return the date of
>modification for a document? (i haven't found the command line
>to do it but perhaps my version is too old)
>
>if i can't do it with lynx, can i get a sujestion as to how
>it could be done? (its for a small shell script i'm working on)

        The HEAD method was desgned primarily for scripts to
be able to get just the MIME headers, which normally include a
Last-Modified field.  Lynx has a keypad command for interactive
HEAD requests (']'), and a complementary commmand line switch,
so you could use  lynx -head -source  but your script might just
as well send a HEAD request directly without the overhead of
invoking Lynx.

        Note that on today's Web many CGI script "authors", like
many HTML document "authors", don't bother to understand the
proper way to do what they are doing before inflicting it on the
Web.  The CERN server expects the script to generate the body
with a HEAD request, and measures it to determine and send the
Content-Length header to the client, but doesn't, as it shouldn't
send the body itself.  My impression is that the Apache server
is designed similarly, but I don't know details about that server.
Many other servers send everything from the script to the client,
even if it was a HEAD request, and many CGI authors don't know
that for those servers they should check the METHOD environment
variable for "HEAD" and not include a body in the reply, so...

        If you want the MIME headers plus the body sent to stdout
as source, use the -mime_header command line switch with Lynx.

        Lynx does not presently save the Last-Modified header such
that it might be included in the showinfo display, i.e., you can
only access it via an interactive HEAD request (']') or with the
-head or -mime_header switches

                                Fote

=========================================================================
 Foteos Macrides            Worcester Foundation for Biomedical Research
 address@hidden         222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]