Closed
Bug 7658
Opened 25 years ago
Closed 25 years ago
document.lastModified returns wrong date.
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
INVALID
M10
People
(Reporter: martin.honnen, Assigned: vidur)
Details
(Whiteboard: [Testcase]document.lastModified returns January 1, 1970 GMT)
Any reference to
document.lastModified
seems to stop script execution.
For instance
<HTML>
<HEAD>
</HEAD>
<BODY onload="alert(document.lastModified); alert('kibology');">
</BODY>
</HTML>
doesn't show.
Haven't tried whether document.writing lastModified still works.
Happens with m6 build on win95. It is rather nasty as it just stops any script using it from running any further than to the
document.lastModified
access.
Reporter | ||
Comment 1•25 years ago
|
||
document.writing document.lastModified is broken too but HTML content after
<SCRIPT>
document.write(document.lastModified);
</SCRIPT>
shows
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M9
Assignee | ||
Comment 2•25 years ago
|
||
I believe the script returns an error since document.lastModified isn't
implemented. It will be done....
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 3•25 years ago
|
||
Fixed on 8/9/1999.
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Summary: accessing document.lastModified stops script execution → document.lastModified return wrong date.
Whiteboard: [Testcase]document.lastModified returns January 1, 1970 GMT
Updated•25 years ago
|
Resolution: FIXED → ---
Comment 4•25 years ago
|
||
The previous summary of this bug was "accessing document.lastModified stops
script execution" and now I'm reopening this bug with new summary.
BUILD: 08-10-09. [Apprunner/Viewer]
STEPS TO REPRODUCE:
1] Please copy the code I'm providing. Save it as HTML file.
2] Open this HTML file with apprunner as well as viewer.
3] You'll see one text box [Which is Result Text box]. and you'll see one button
"Acess LastModified".
4] Click this button.
EXPECTED RESULTS:
Result text box should show date when the HTML file was modified last. In your
case it should be the date you create that file. For example, I created this
file today, so it should show something like "08/10/99 14:13:40".
ACTUAL RESULTS:
Result text box shows 30 years back date. Currently document.lastModified is
returning "January 1, 1970 GMT".
CODE:
<HTML>
<HEAD>
</HEAD>
<BODY >
<script>
<!--
function getlastmod(){
document.inForm.result.value=document.lastModified;
}
//-->
</script>
<form name="inForm">
Result Text Box: <input type="text" name="result" size="30" value="">
<br>
<input type="button" value="Access LastModified" onclick="getlastmod();">
</form>
</BODY>
</HTML>
END OF CODE:
Updated•25 years ago
|
Summary: document.lastModified return wrong date. → document.lastModified returns wrong date.
Assignee | ||
Updated•25 years ago
|
Status: REOPENED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → INVALID
Assignee | ||
Comment 5•25 years ago
|
||
document.lastModified returns the value in the HTTP last-modified header. If
none exists, it returns "January 1, 1970 GMT". This won't work for file: URLs.
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 6•25 years ago
|
||
Oh OK, Sorry Vidur. I didn't knew about it. Yeah its working fine with HTTP
Protocol.
Marking verified.
You need to log in
before you can comment on or make changes to this bug.
Description
•