Skip to main content
added 17 characters in body
Source Link
slm
  • 380.1k
  • 127
  • 793
  • 897

I have web pages on Ubuntu that return the lastModified date as part of the displayed text using javascript to create the following:

Last modified: 08/28/2017

Last modified: 08/28/2017

That's the actual last-modified date of the web page. But recently, I'm getting the CURRENT date returned instead. I haven't altered the page whatseverwhatsoever. I've checked, and this is happening to EVERY web page which used to properly return lastModified. I have some of those pages on my Macintosh, and I can summon them from my 'localhost'. They come up with the proper lastModified date, and I've compared a couple of the web pages between the Ubuntu version, and my Macintosh versions, and they are identical in content, creation-date, and last-modified-date.

Does anyone have a clue of what's happening.? Below is the JavaScript I used to return just the date portion, leaving off the time portion of lastModified:

Last modified:
<script language="JavaScript">
var testlast=document.lastModified;
testlast=testlast.substr(0,10);
document.write(" "+testlast);
</script>

From Ubuntu, this now produces:
Last Modified: 09/02/2018

Last Modified: 09/02/2018

On my Mac, it is still producing:
Last modified: 08/28/2017

Last modified: 08/28/2017

I have web pages on Ubuntu that return the lastModified date as part of the displayed text using javascript to create the following:

Last modified: 08/28/2017

That's the actual last-modified date of the web page. But recently, I'm getting the CURRENT date returned instead. I haven't altered the page whatsever. I've checked, and this is happening to EVERY web page which used to properly return lastModified. I have some of those pages on my Macintosh, and I can summon them from my 'localhost'. They come up with the proper lastModified date, and I've compared a couple of the web pages between the Ubuntu version, and my Macintosh versions, and they are identical in content, creation-date, and last-modified-date.

Does anyone have a clue of what's happening. Below is the JavaScript I used to return just the date portion, leaving off the time portion of lastModified:

Last modified:
<script language="JavaScript">
var testlast=document.lastModified;
testlast=testlast.substr(0,10);
document.write(" "+testlast);
</script>

From Ubuntu, this now produces:
Last Modified: 09/02/2018

On my Mac, it is still producing:
Last modified: 08/28/2017

I have web pages on Ubuntu that return the lastModified date as part of the displayed text using javascript to create the following:

Last modified: 08/28/2017

That's the actual last-modified date of the web page. But recently, I'm getting the CURRENT date returned instead. I haven't altered the page whatsoever. I've checked, and this is happening to EVERY web page which used to properly return lastModified. I have some of those pages on my Macintosh, and I can summon them from my 'localhost'. They come up with the proper lastModified date, and I've compared a couple of the web pages between the Ubuntu version, and my Macintosh versions, and they are identical in content, creation-date, and last-modified-date.

Does anyone have a clue of what's happening? Below is the JavaScript I used to return just the date portion, leaving off the time portion of lastModified:

Last modified:
<script language="JavaScript">
var testlast=document.lastModified;
testlast=testlast.substr(0,10);
document.write(" "+testlast);
</script>

From Ubuntu, this now produces:

Last Modified: 09/02/2018

On my Mac, it is still producing:

Last modified: 08/28/2017
Source Link
Dickster
  • 149
  • 1
  • 5

Why would javascript document.lastModified stop working, and return current date?

I have web pages on Ubuntu that return the lastModified date as part of the displayed text using javascript to create the following:

Last modified: 08/28/2017

That's the actual last-modified date of the web page. But recently, I'm getting the CURRENT date returned instead. I haven't altered the page whatsever. I've checked, and this is happening to EVERY web page which used to properly return lastModified. I have some of those pages on my Macintosh, and I can summon them from my 'localhost'. They come up with the proper lastModified date, and I've compared a couple of the web pages between the Ubuntu version, and my Macintosh versions, and they are identical in content, creation-date, and last-modified-date.

Does anyone have a clue of what's happening. Below is the JavaScript I used to return just the date portion, leaving off the time portion of lastModified:

Last modified:
<script language="JavaScript">
var testlast=document.lastModified;
testlast=testlast.substr(0,10);
document.write(" "+testlast);
</script>

From Ubuntu, this now produces:
Last Modified: 09/02/2018

On my Mac, it is still producing:
Last modified: 08/28/2017