Document.lastModified (Property)

The modification date of the document is stored in this property.

Availability:

JavaScript - 1.0
JScript - 1.0
Internet Explorer - 3.02
Netscape - 2.0
Opera - 3.0
Property/method value type:String primitive
JavaScript syntax:-myDocument.lastModified

This value is obtained by inspecting the HTTP headers as they arrive in the browser. The value of this header is defined by the web server, which probably used the modification date of the file in the htdocs directory that it served the content from.

You can check that this is a valid date by handing it to the Date.parse() method as an argument. If Date.parse() yields a zero value, then it is invalid unless the file was last modified in January 1970 which is extremely unlikely.

See also:Document object, Document.fileModifiedDate, Document.location, Document.referrer, Document.title

Property attributes:

ReadOnly.