Last Modified Date

Discussion in 'HTML' started by Dennis Marks, May 2, 2004.

  1. Dennis Marks

    Dennis Marks Guest

    There seems to be a major program with the automatic display of the
    last modified date. Using the javascript "document.lastModified"
    sometimes returns the correct date and sometimes 1 Jan 1970 depending
    the the browser.

    Using SSI LAST_MODIFIED can return the last modified date, ISP system
    boot date, or many others.

    The only last modified date that I have been able to use with any
    consistancy is the SSI flastmod command.

    Is this a common problem?

    --
    Dennis Marks
    http://www.dcs-chico.com/~denmarks/
    To reply change none to dcsi.


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
     
    Dennis Marks, May 2, 2004
    #1
    1. Advertising

  2. Dennis Marks

    Augustus Guest

    "Dennis Marks" <> wrote in message
    news:020520041251137745%...
    > There seems to be a major program with the automatic display of the
    > last modified date. Using the javascript "document.lastModified"
    > sometimes returns the correct date and sometimes 1 Jan 1970 depending
    > the the browser.
    >
    > Using SSI LAST_MODIFIED can return the last modified date, ISP system
    > boot date, or many others.
    >
    > The only last modified date that I have been able to use with any
    > consistancy is the SSI flastmod command.
    >
    > Is this a common problem?


    Why would you want that on your site?

    Don't you want people to think your information is current?

    If your site is selling something or is a restaurant and has its menu online
    a "last modified" could get people wondering "Are these prices current? Or
    have they gone up since then?"

    Even if its just been 2 or 3 months since you last modified your site/page
    it often makes me think about the content... how current is it? If the
    designer hasn't modified the site in 3 months was it a big modification? Or
    maybe he/she was just updating the (c)copyright at the bottom of the page?

    If you update your site daily or every couple of days then your regular
    users will know your site is kept up to date as they come back. If you are
    adding data to the site (IE: new picture sets, new news articles, etc) then
    you might put in a "WHATS NEW" section with dates on the
    articles/pictures/etc
     
    Augustus, May 2, 2004
    #2
    1. Advertising

  3. "Dennis Marks" <> wrote in message news:020520041251137745%...
    : There seems to be a major program with the automatic display of the
    : last modified date. Using the javascript "document.lastModified"
    : sometimes returns the correct date and sometimes 1 Jan 1970 depending
    : the the browser.
    :
    : Using SSI LAST_MODIFIED can return the last modified date, ISP system
    : boot date, or many others.
    :
    LOL!

    : The only last modified date that I have been able to use with any
    : consistancy is the SSI flastmod command.
    :
    : Is this a common problem?
    :
    In context of browser cache hint I don't think it matters if the timestamp
    is correct or not. It should be fine as long as the value is consistent and
    only change when the file is actually modified.

    Perhaps, browsers are somewhat smarter then you would need to make
    sure the most recent mod timestamp is always greater than previous ones.

    HTH,

    Long
    www.webcharm.ca - Integrated content management web hosting
     
    Long - CM web hosting, May 2, 2004
    #3
  4. Augustus wrote:
    > Why would you want that on your site?
    >
    > Don't you want people to think your information is current?


    I respect my users enough to want them to know exactly how old the info
    on the page is. To do otherwise is misrepresentation.

    > If your site is selling something or is a restaurant and has its menu online
    > a "last modified" could get people wondering "Are these prices current? Or
    > have they gone up since then?"


    Those are all valid and appropriate questions for a user to ask of a
    site. They are also good reasons to keep your pages updated, instead of
    tricking users into thinking they are.
    --
    Michael Wilcox, http://mikewilcox.t35.com/
     
    Michael Wilcox, May 3, 2004
    #4
  5. Dennis Marks

    Jim Ley Guest

    On Sun, 02 May 2004 18:02:59 -0500, Michael Wilcox
    <> wrote:

    >Augustus wrote:
    >> Why would you want that on your site?
    >>
    >> Don't you want people to think your information is current?

    >
    >I respect my users enough to want them to know exactly how old the info
    >on the page is. To do otherwise is misrepresentation.
    >
    >> If your site is selling something or is a restaurant and has its menu online
    >> a "last modified" could get people wondering "Are these prices current? Or
    >> have they gone up since then?"

    >
    >Those are all valid and appropriate questions for a user to ask of a
    >site. They are also good reasons to keep your pages updated, instead of
    >tricking users into thinking they are.


    One thing to remember though is that it's often better to put the time
    in the file manually, rather than using the lastModified even on the
    server, as you often may want to update a page without updating the
    actual substantial content.

    Jim.
    --
    comp.lang.javascript FAQ - http://jibbering.com/faq/
     
    Jim Ley, May 3, 2004
    #5
  6. Dennis Marks

    Dennis Marks Guest

    In article <>, Jim Ley
    <> wrote:

    <snip>
    >
    > One thing to remember though is that it's often better to put the time
    > in the file manually, rather than using the lastModified even on the
    > server, as you often may want to update a page without updating the
    > actual substantial content.
    >
    > Jim.


    This may be the best advice I've seen. When updating a page it is a
    simple matter to add the date.

    --
    Dennis Marks
    http://www.dcs-chico.com/~denmarks/
    To reply change none to dcsi.


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
     
    Dennis Marks, May 3, 2004
    #6
  7. Dennis Marks

    Frogleg Guest

    On Sun, 2 May 2004 13:14:04 -0700, "Augustus"
    <> wrote:

    >
    >"Dennis Marks" <> wrote


    >> There seems to be a major program with the automatic display of the
    >> last modified date. Using the javascript "document.lastModified"
    >> sometimes returns the correct date and sometimes 1 Jan 1970 depending
    >> the the browser.


    >Why would you want that on your site?


    I maintain an informational site that would be pretty worthless if
    allowed to lag. The date lets users know how current the information
    is. And I often would like to see how current other sites are for all
    kinds of reasons -- is the site just not being updated, or was the
    last board meeting actually in 2001?
     
    Frogleg, May 4, 2004
    #7
  8. JRS: In article <020520041251137745%>, seen in
    news:comp.lang.javascript, Dennis Marks <> posted at
    Sun, 2 May 2004 12:51:13 :

    >There seems to be a major program with the automatic display of the
    >last modified date. Using the javascript "document.lastModified"
    >sometimes returns the correct date and sometimes 1 Jan 1970 depending
    >the the browser.
    >
    >Using SSI LAST_MODIFIED can return the last modified date, ISP system
    >boot date, or many others.
    >
    >The only last modified date that I have been able to use with any
    >consistancy is the SSI flastmod command.
    >
    >Is this a common problem?



    ISTR that you have already been told, repeatedly, that the newsgroup FAQ
    is the place to look for answers to questions which may be common. That
    is one such question; and a comprehensive answer is too long to be
    repeated in the newsgroup whenever someone wants to know, or twice a
    week, or both.

    It is often helpful to indicate one's location (or that to which
    reported observations pertain), especially on date/time questions.
    Since you do not do so, I had imagined you to be American. But in that
    case, AIUI you would see not 1970 but 1969, the USA being
    chronologically retarded. But ICBW.


    However, it is useful to have the question answered here occasionally,
    so that it may be checked.

    I believe that the problem is multi-homed.

    Either a Web server sends the Last-Modified information (which in
    general will actually be Last-Uploaded) to a defined format explicitly
    GMT, or it does not. I recall no proof of anything else occurring.

    A browser receiving that line will generate a lastModified string, not
    necessarily in a sensible format (i.e. possible Y2K error, date field
    error, no zone given, ...?) but recognisably related to the upload time;
    AFAIK, that is not known to fail.

    A browser not receiving that line may use the current date/time, or use
    the equivalent of new Date(0), hence giving Americans 1969. It could
    also use a fixed string representing 1970-01-01 00:00:00, with or
    without zone indicator; but I've not heard of that occurring as distinct
    from the previous (in the UK, there is no necessary difference).

    It would have been more sensible to leave lastModified undefined, or to
    define it with an undefined value, or to set it to NaN, or to some
    string such as "Not Available" or "Not Defined".

    It's all rather stupid, and the underlying stupidity is at the browser-
    designer level. The browser receives an unambiguous RFC2068 string,
    which is directly convertible to a Date Object; but it does not
    necessarily set lastModified to an equivalent string. Javascript
    lastModified should have been a Date Object (or an object of a type
    derived from the DO by dummying all Methods that can change the value.

    --
    © John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
    <URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
    <URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
    <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
     
    Dr John Stockton, May 5, 2004
    #8
  9. Michael Wilcox wrote:

    > Augustus wrote:
    >> Why would you want that on your site?
    >>
    >> Don't you want people to think your information is current?

    >
    > I respect my users enough to want them to know exactly how old the info
    > on the page is. [...]


    So you should not use client-side techniques
    to accomplish this, because they are unreliable.


    F'up2 dcljs

    PointedEars
     
    Thomas 'PointedEars' Lahn, May 21, 2004
    #9
  10. Dennis Marks wrote:

    > In article <>, Jim Ley
    > <> wrote:


    Please do not write attribution novels.
    <http://netmeister.org/news/learn2quote.html>

    > [...] When updating a page it is a simple matter to add the date.


    And there is a standard for meta information that can be used for this.

    <http://dublincore.org/documents/dcmi-terms/#modified>

    However, it is a certainly a Good Thing to include that information in the
    visible part (body) of a document, too. Server-side techniques can be quite
    useful for both, if available, e.g.:

    <?php echo date('Y-m-d\TH:i:sO', @filemtime(__FILE__)) ?>

    see

    <http://php.net/date>
    <http://php.net/filemtime>
    <http://php.net/manual/en/language.constants.predefined.php>


    X-Post & F'up2 comp.infosystems.www.authoring.misc

    PointedEars
     
    Thomas 'PointedEars' Lahn, May 21, 2004
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rich Pasco
    Replies:
    2
    Views:
    19,338
    Rich Pasco
    Oct 9, 2003
  2. Replies:
    2
    Views:
    732
  3. Marc Mendez

    File last modified date wrong

    Marc Mendez, Aug 21, 2007, in forum: Java
    Replies:
    8
    Views:
    1,108
    Roedy Green
    Aug 23, 2007
  4. Roedy Green

    Date last Accessed vs Date Modified

    Roedy Green, Feb 21, 2008, in forum: Java
    Replies:
    1
    Views:
    1,468
    Nigel Wade
    Feb 22, 2008
  5. Elliot
    Replies:
    1
    Views:
    315
    siccolo
    Feb 27, 2008
Loading...

Share This Page