Re: javascript file mod date
by Nathan Lyle <natlyle(at)nmu.edu>
|
Date: |
Fri, 13 Jul 2001 00:10:04 -0400 |
To: |
"Lois Wakeman" <lois(at)lois.co.uk> |
Cc: |
hwg-techniques(at)hwg.org |
In-Reply-To: |
hhb |
|
todo: View
Thread,
Original
|
|
<Lois>
>...But as soon as any change whatsoever is made to the file (i.e. it is
>written
>to disk), then the mod. date changes. This is true even if the author just
>saved the file unchanged. I can't imagine a situation in which the layout
>could change without touching the file, unless a linked stylesheet was
>changed. But I'd be interested to hear how this could happen else.
When you think about it, since the file that's being viewed in the browser
is one that has been saved to the local system after being created (copying
data through the internet connection) then any "on-the-fly" creation of
html (like javascript reflection) would constitute a modification in the
saved html file that is rendered. But, I confuse myself more now, because
wouldn't that mean (as you say above) that since the file is being saved to
the client hard drive, that the mod date will automatically be the current
date? I suppose this depends on how browsers handle any sort of file
information (like the mod date) in their saving of the file... but it would
also depend on the client's operating system, in how it handles files in
general. <sigh>
In the situations I have been using javascript to create the "last
modified" message (ex: http://euclid.nmu.edu/~natlyle/mccu ), from an
external .js file, the date has *not* always been the current date, and
seems to be the date that I put the file on the server. So it would *seem*
to be working.
And actually, as I'm typing this, I think I may have realized what happened
the few times I noticed an unexpected date change. When I put the files on
the server, the date that the files began to exist there was the date that
was displayed, even if the file had not been *modified* for several days
before the transfer. So the "last mod" date script seems (at least in this
case) to be working properly. I believe I forgot to take into account the
effect of the transfer of the files from one op system to another. <slaps
forehead>
If it turns out to be anything else, I will post an epilogue. ;-)
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA