Last Modified Date |
Last Modified Date |
denmarks |
Aug 24 2012, 10:27 AM
Post
#1
|
Advanced Member Group: Members Posts: 207 Joined: 17-January 08 Member No.: 4,734 |
I am using document.lastModified to display the last modified date on a web page. The times are different in IE and Firefox. Why would that be?
IE shows 08/24/2012 08:20:45 Firefox shows 08/24/2012 08:21:48 |
pandy |
Aug 24 2012, 12:19 PM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Hmm... it took you one minute and three seconds to start FF and load the page in it?
How do those times compare to your computer clock if you reload the page? |
denmarks |
Aug 24 2012, 12:53 PM
Post
#3
|
Advanced Member Group: Members Posts: 207 Joined: 17-January 08 Member No.: 4,734 |
Hmm... it took you one minute and three seconds to start FF and load the page in it? How do those times compare to your computer clock if you reload the page? I just reloaded the page and the exact same times appear. Even if taken from the cache it is strange since I displayed it in Firefox FIRST. |
pandy |
Aug 24 2012, 01:00 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Sorry, I'm so confused today. Of course you get the same. I read what you wrote but i was thinking current time, not last modified.
That's strange. This page is on a server, I suppose? |
denmarks |
Aug 24 2012, 01:06 PM
Post
#5
|
Advanced Member Group: Members Posts: 207 Joined: 17-January 08 Member No.: 4,734 |
|
pandy |
Aug 24 2012, 03:36 PM
Post
#6
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
I tried to google but found nothing.
|
denmarks |
Aug 24 2012, 03:55 PM
Post
#7
|
Advanced Member Group: Members Posts: 207 Joined: 17-January 08 Member No.: 4,734 |
I tried to google but found nothing. The website is http://dmmarks.com/hawaii2012.html The date displays at the bottom of the "please read" section. IE - Last modified: 08/24/2012 11:43:53 Firefox - Last modified: 08/24/2012 11:46:19 First it was a 1 min and 3 sec difference. I did another update and now it is 2 min and 26 sec. |
pandy |
Aug 24 2012, 04:13 PM
Post
#8
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
It must be some odd caching issue even if I don't understand how this happens. I visited that page with 4 different browsers and I got the same time stamp with all of them.
CODE K-mel: Last modified: 08/24/2012 20:46:19 IE7: Last modified: 08/24/2012 20:46:19 Iron: Last modified: 08/24/2012 18:46:19 Opera: Last modified: Fri, 24 Aug 2012 18:46:19 GMT |
pandy |
Aug 24 2012, 04:14 PM
Post
#9
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
No I didn't! There's a 2 hour difference! I didn't even look at the hour first, just minutes and seconds.
|
Christian J |
Aug 25 2012, 03:45 PM
Post
#10
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
Seems there are quirks in (at least older) browsers:
"Finally, Opera and Explorer 4 give a date two hours too early, while Explorer 3 even makes it 17 hours early. The Explorer 4 error seems to be that it doesn't take time zones and daylight saving time into account. My server returns a GMT time and Explorer 4 literally copies it, while Netscape and Explorer 5 calculate local time." The above doesn't explain that one minute and three second difference. Are you sure you didn't change the page in between? Server-side scripts should be more reliable, e.g. PHP's getlastmod() function. |
pandy |
Aug 25 2012, 04:29 PM
Post
#11
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Ah, of course ppk would have something on it. Good find. Or did you have it bookmarked?
The two hour difference I get made me think about offset from GMT + daylight saving, but I didn't really think it could be that dumb. |
pandy |
Aug 25 2012, 04:32 PM
Post
#12
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Server-side scripts should be more reliable, e.g. PHP's getlastmod() function. I think last modified should be hardcoded to be of any use. People would want to know when content was added or changed, right? No one cares if and when the author corrected a typo or a HTML mistake. But that's me. |
denmarks |
Aug 25 2012, 04:38 PM
Post
#13
|
Advanced Member Group: Members Posts: 207 Joined: 17-January 08 Member No.: 4,734 |
Here is the latest
Firefox - Last modified: 08/25/2012 11:51:49 IE - Last modified: 08/25/2012 11:51:26 Now it is 23 seconds. http://hawaii.dmmarks.com If really doesn't matter that much. It is just to let people about when the last change was. I tried doing it manually but kept forgetting. This post has been edited by denmarks: Aug 25 2012, 04:40 PM |
pandy |
Aug 25 2012, 06:30 PM
Post
#14
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
You should write to ppk. Maybe he's still interested.
Nice new ava BTW. IMO a handsome hat is essenctal in avatars. |
Christian J |
Aug 26 2012, 07:59 AM
Post
#15
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
Ah, of course ppk would have something on it. Good find. Or did you have it bookmarked? Just googled. QUOTE The two hour difference I get made me think about offset from GMT + daylight saving, but I didn't really think it could be that dumb. I couldn't find anything about web standards (haven't checked the ECMA script spec, though). Maybe there isn't any. QUOTE I think last modified should be hardcoded to be of any use. People would want to know when content was added or changed, right? No one cares if and when the author corrected a typo or a HTML mistake. But that's me. I like to post a news item on the site's news page about important changes (and/or add to the page's revision history). OTOH a lazy author will always forget to manually change the date of the edited page, or maybe the reader and author disagrees on what's considered a real change? Sometimes even a corrected typo could be important. QUOTE You should write to ppk. Maybe he's still interested. FWIW he seems to have removed the page (along with a lot of other content) from his current site. Seems he's mostly into mobile phones these days. QUOTE IMO a handsome hat is essenctal in avatars. Just noticed I have one myself. |
Christian J |
Aug 26 2012, 08:16 AM
Post
#16
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
Here is the latest Firefox - Last modified: 08/25/2012 11:51:49 IE - Last modified: 08/25/2012 11:51:26 Now it is 23 seconds. http://hawaii.dmmarks.com According to http://www.rexswain.com/cgi-bin/httpview.cgi the current Last modified date is 25·Aug·2012·22:44:14·GMT. BTW your URL above redirects to http://dmmarks.com/hawaii2012.html --I assume the browser uses the Last Modified header for the latter. Could that have something to do about this (like if the server sometimes incorrectly sends the header for the former URL)? BTW2, I get a JS error for line 1104 in IE9. You should probably use a comma instead of a period sign here: CODE onclick="printEvent('K'.'Book Club');" |
Christian J |
Aug 26 2012, 08:20 AM
Post
#17
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
Another long shot. Bookmarklets that show the Last Modified date often refuse to work if the page uses frames. Don't know why, but maybe the same reason applies to your script too? Your page does use iframes...
|
denmarks |
Aug 26 2012, 09:23 AM
Post
#18
|
Advanced Member Group: Members Posts: 207 Joined: 17-January 08 Member No.: 4,734 |
|
pandy |
Aug 26 2012, 10:09 AM
Post
#19
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
|
Lo-Fi Version | Time is now: 23rd April 2024 - 03:23 PM |