I understand that this question is 4 years old, but an Internet search has shown that satisfactory answers remain rare. Peter's answer is part of the solution. When I had the same problem to solve, it made me start. But the rest is the solution ...
As he said, the web server must be set up to send the date with the last change ... so how do you set up the web server?
Assuming that you have the necessary level of control, you must first enable the server side. There are several ways to do this - one of them is xbithack. Good link http://httpd.apache.org/docs/current/howto/ssi.html .
Assuming you did this, you need to set the execution bit in any html file that the server part should have, which includes parsing. This can be done on the command line of a UNIX-like system: chmod u+x file.html or on a Mac using get-info (command-I) in the file.
This leaves a snippet for actual placement in your file, which looks like this:
This document last modified <!--#flastmod file="index.html" -->
Since I found many, many recommendations that did not include this, and just used javascript document.lastModified , I suspect that some servers give you what you want with the javascript version, while some (including the one ) do not do.
DRVic
source share