I have a small snippet of javascript that I add to my webpages
If I put the web page on a Linux host, it does what I expect, shows the last update for the page.
However, on a FreeBSD host, rather than show the latest update, it shows the last visit to the page.
I don't know javascript at all, I got this snippet years ago somewhere or other. At the time I had web pages on Linux and it did what I wanted. Is anyone who knows javascript inclined to tell me what should be different on a FreeBSD host? On FreeBSD, it's in a jail, but I don't see how that would be relevant. This happens whether I use Nginx or Apache, and worked on Linux with either web server.
Code:
<center><script language="JavaScript" type="text/javascript">
if (Date.parse(document.lastModified) > 0) {
document.write ('<b>last modified: <\/b>' + document.lastModified +'<p>');
}
document.write('<b> url:<\/b>' + document.location.href + '<\/font><p>');
</script>
If I put the web page on a Linux host, it does what I expect, shows the last update for the page.
However, on a FreeBSD host, rather than show the latest update, it shows the last visit to the page.
I don't know javascript at all, I got this snippet years ago somewhere or other. At the time I had web pages on Linux and it did what I wanted. Is anyone who knows javascript inclined to tell me what should be different on a FreeBSD host? On FreeBSD, it's in a jail, but I don't see how that would be relevant. This happens whether I use Nginx or Apache, and worked on Linux with either web server.