The Question

Can I get the last modified date of the current document using JavaScript?

Answer

The lastModified property returns the date and time the current document was last modified.

Browser Support

IEFirefoxChromeSafariOpera
YesYesYesYesYes

Example

Get the date and time the current document was last modified:

var x = document.lastModified;

The result of x will be:

11/13/2014 10:05:21

References & Resources

  • N/A