Alaska Software Inc. - JavaScript Question
Username: Password:
AuthorTopic: JavaScript Question
Donald KeatingJavaScript Question
on Mon, 22 Apr 2013 13:28:08 -0400
Hi Y'all,

I know this is not an Xbase++ problem but, will appreciate any help
you can give.  I've chased my tail on the Internet and unable to find
an answer that works.

This is JS code in my HTML file.
document.write(document.lastModified)

Chrome and Safari web browsers render this as current GMT date/time.
IOW it changes each time the page is refreshed.

IE 10 and Firefox render it correctly, i. e., date/time the HTML file
was last modified.

Thanks,

   >don<
James LoughnerRe: JavaScript Question
on Mon, 22 Apr 2013 16:35:54 -0400
And you are surprised why??? LOL

I suppose it is a differences in interpretation on what is being modified.

Jim

On 04/22/2013 01:28 PM, Donald Keating wrote:
> Hi Y'all,
>
> I know this is not an Xbase++ problem but, will appreciate any help
> you can give.  I've chased my tail on the Internet and unable to find
> an answer that works.
>
> This is JS code in my HTML file.
> document.write(document.lastModified)
>
> Chrome and Safari web browsers render this as current GMT date/time.
> IOW it changes each time the page is refreshed.
>
> IE 10 and Firefox render it correctly, i. e., date/time the HTML file
> was last modified.
>
> Thanks,
>
>     >don<
>
Thomas BraunRe: JavaScript Question
on Wed, 24 Apr 2013 11:37:37 +0200
Donald Keating wrote:

> This is JS code in my HTML file.
> document.write(document.lastModified)
> 
> Chrome and Safari web browsers render this as current GMT date/time.
> IOW it changes each time the page is refreshed.
> 
> IE 10 and Firefox render it correctly, i. e., date/time the HTML file
> was last modified.

According to 
   https://developer.mozilla.org/de/docs/DOM/document.lastModified 
document.lastModified is "Not part of any standard" - so it is up to the
browser maker how this is interpreted.

You might also find more information here (attention, loads of documents!):

http://www.w3.org/TR/tr-technology-stds#tr_HTML

Thomas
Donald KeatingRe: JavaScript Question
on Wed, 24 Apr 2013 12:22:33 -0400
Thanks Thomas,  

Already looked at some of those.  Will review again.

Have about decided there's no reliable way to do what I'm trying in
all browsers.

   >don<

On Wed, 24 Apr 2013 11:37:37 +0200, Thomas Braun wrote:

>Donald Keating wrote:
>
>> This is JS code in my HTML file.
>> document.write(document.lastModified)
>> 
>> Chrome and Safari web browsers render this as current GMT date/time.
>> IOW it changes each time the page is refreshed.
>> 
>> IE 10 and Firefox render it correctly, i. e., date/time the HTML file
>> was last modified.
>
>According to 
>   https://developer.mozilla.org/de/docs/DOM/document.lastModified 
>document.lastModified is "Not part of any standard" - so it is up to the
>browser maker how this is interpreted.
>
>You might also find more information here (attention, loads of documents!):
>
>http://www.w3.org/TR/tr-technology-stds#tr_HTML
>
>Thomas
Donald KeatingRe: JavaScript Question
on Wed, 24 Apr 2013 15:36:12 -0400
Not the solution I wanted but, have hard coded the DateTime.

       document.write("Last Updated: <BR>");
       document.write("4/24/13 4:10 PM");

Which I'll need to change each time I update the site.

Can't win all of them. 

  >don<


On Wed, 24 Apr 2013 12:22:33 -0400, Donald Keating wrote:

>Thanks Thomas,  
>
>Already looked at some of those.  Will review again.
>
>Have about decided there's no reliable way to do what I'm trying in
>all browsers.
>
>   >don<
>
>On Wed, 24 Apr 2013 11:37:37 +0200, Thomas Braun wrote:
>
>>Donald Keating wrote:
>>
>>> This is JS code in my HTML file.
>>> document.write(document.lastModified)
>>> 
>>> Chrome and Safari web browsers render this as current GMT date/time.
>>> IOW it changes each time the page is refreshed.
>>> 
>>> IE 10 and Firefox render it correctly, i. e., date/time the HTML file
>>> was last modified.
>>
>>According to 
>>   https://developer.mozilla.org/de/docs/DOM/document.lastModified 
>>document.lastModified is "Not part of any standard" - so it is up to the
>>browser maker how this is interpreted.
>>
>>You might also find more information here (attention, loads of documents!):
>>
>>http://www.w3.org/TR/tr-technology-stds#tr_HTML
>>
>>Thomas