473,387 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Last Modified Date

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
11 3596

"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
"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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Shawn McKenzie | last post by:
Can someone help me with a query to get the date/time that a database was last modified? I looked at the SHOW command but there was no mention of this. TIA, Shawn
1
by: Amanda | last post by:
Hi, hope you can help me with this one. If I want to get the date a page has been last modified, I can do something like .. document.write("<b>Last updated: "+document.lastModified+"</b>"); ...
7
by: laredotornado | last post by:
Hello, Does anyone know how (or if) I can figure out the last time a web page was last modified if my only access to it is via HTTP (a web browser). Right now, I'm looking at "Page Info" options....
5
by: Steel | last post by:
Hi at all it is the first time that I use PHP and I need only to modify the last modified date of a file I maked a FIRST little script like this: $FileName="myfile.txt"; $Today...
6
by: SQLcat | last post by:
I have a VBScript as follows: Dim xmlHTTP : Set xmlHTTP = CreateObject("Microsoft.XMLHTTP") Dim adoStream : Set adoStream = CreateObject("adodb.stream") Const bGetAsAsync = False ' wait for...
3
by: RAMohrmann | last post by:
Greetings, I am attempting to view all files in a directory and if those files have not been modified within the last couple days I will remove them. In order to do this I need to look at the...
1
by: Svetac | last post by:
Hi, I use a script that shows when the page was last modified. It works fine for just one html file. The thing I would like to do is that the script shows me of last modified file in root...
1
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I format the Last-Modified date with javascript?...
3
by: Gretsch | last post by:
Web, html, javascript, Hi, I need to calculate the time since this .htm file was last modified. {which I can then use in a calculation, rather than display, so days&decimals format would be OK}...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.