Last Modified Date


Example of Script
Grab the Code
Explanation of Code
This script will let your visitors know how recently the information you provide on your web site has been updated without the need for you to change a date and time everytime you make a change in the page. The script does this by using the document.write method to add the date and time that the document was last modified. The date and time of modification are obtained through the document.lastModified property.

This data is provided through the HTTP header data sent by the web server. The web server is not required to provide the last-modified dates. If the last-modified data is not provided by the web server, JavaScript assumes 0. This script tests for such a case by the use of the Date.parse() function.

Copyright © 2001 John H. Bolgiano, Jr. - All rights reserved
Modified with permission for educational use by Roberta Bush