By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,491 Members | 3,230 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,491 IT Pros & Developers. It's quick & easy.

Last Modified Date

P: n/a
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! =-----
Jul 23 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a

"Dennis Marks" <de******@none.net> wrote in message
news:020520041251137745%de******@none.net...
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
Jul 23 '05 #2

P: n/a
"Dennis Marks" <de******@none.net> wrote in message news:020520041251137745%de******@none.net...
: 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
Jul 23 '05 #3

P: n/a
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/
Jul 23 '05 #4

P: n/a
On Sun, 02 May 2004 18:02:59 -0500, Michael Wilcox
<mj************@yahoo.com> 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/

Jul 23 '05 #5

P: n/a
In article <40****************@news.individual.net>, Jim Ley
<ji*@jibbering.com> 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! =-----
Jul 23 '05 #6

P: n/a
JRS: In article <02*************************@none.net>, seen in
news:comp.lang.javascript, Dennis Marks <de******@none.net> 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.
Jul 23 '05 #7

P: n/a
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
Jul 23 '05 #8

P: n/a
Dennis Marks wrote:
In article <40****************@news.individual.net>, Jim Ley
<ji*@jibbering.com> 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
Jul 23 '05 #9

P: n/a
Thomas 'PointedEars' Lahn wrote:
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.


I don't. I use PHP.
--
Michael Wilcox, http://mikewilcox.t35.com/
Jul 23 '05 #10

P: n/a
Michael Wilcox wrote:
Thomas 'PointedEars' Lahn wrote:
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.


I don't. I use PHP.


1. Fine. Read "you" as "one".

2. There is client-side PHP, although it is not widely used.
PointedEars
Jul 23 '05 #11

P: n/a
Thomas 'PointedEars' Lahn wrote:
Michael Wilcox wrote:

Thomas 'PointedEars' Lahn wrote:
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.


I don't. I use PHP.

1. Fine. Read "you" as "one".

2. There is client-side PHP, although it is not widely used.


Example?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.