How to insert "page last updated on <?>)" without typing it myself?
I was wondering if there was an automatic update withing MS Word webpage files that would automatically enter the current date on my template when I upload a new page?
- Anonymous1 decade agoFavorite Answer
Unfortunately, the previous answer doesn't achieve what you are after. The time that will be reported as the time last modified is the first time YOU visit the page, not the last time you edited the page on the server.
You can see this for yourself here:
You can do what you want with a simple server-side include; link to explanation is below.
Most servers support server-side includes. Some require you to change your file extensions from .htm or .html to .shtm or .shtml, but most support SSI without modifying your file extensions.
- Anonymous1 decade ago
var updated = document.lastModified;
document.write ("This page was last updated " + updated );
edit after the below response:
The reason that on the w3schools site it has a last modified date as today is because maybe that frame's document has write permissions to it, so anyone trying that editor today will affect the date