Last Modified Date

D

Dennis Marks

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?
 
A

Augustus

Dennis Marks said:
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
 
L

Long - CM web hosting

: 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
 
M

Michael Wilcox

Augustus said:
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.
 
J

Jim Ley

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


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.
 
D

Dennis Marks

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.
 
F

Frogleg

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?
 
D

Dr John Stockton

JRS: In article <020520041251137745%[email protected]>, seen in
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.
 
T

Thomas 'PointedEars' Lahn

Michael said:
Augustus said:
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
 
T

Thomas 'PointedEars' Lahn

Dennis said:

Please do not write attribution novels.
[...] 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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top