Javascript - Last modification made on a web page

April 2018

Monitoring changes made your website:
Using JavaScript, it is possible to display the last modification made on a the web page through the lastmodified property of the object document:

<SCRIPT language="javascript">
var lastModif=document.lastModified;
var dateModif = new Date(lastModif);
var day = dateModif.getDate();
var month=dateModif.getMonth();
var year=dateModif.getYear();
var hours=dateModif.getHours();
var minutes=dateModif.getMinutes();

document.write("la modification made on the ");
document.write(day+"/"+"month"+"/"+year+" at "+hours+":"+minutes);

Published by jak58. Latest update on January 30, 2010 at 05:40 AM by jak58.
This document, titled "Javascript - Last modification made on a web page," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (
Create a Java Unit Converter
Javascript - Modifying the height of element HTML