logo To Foot
© J R Stockton, ≥ 2009-09-30

Test Page
for
JavaScript lastModified
and
HTTP Last-Modified
.

No-Frame * Framed Index * Frame This
Links within this site :-

Datestamps of Web Documents

To see the code of this page, use View Source or similar.

SSI

With Server Side Includes (unlike with lastModified) the author can control the format to be given and make it unambiguous.

Reading JavaScript document.lastModified

The format of the JavaScript document.lastModified string is browser-dependent.

The actual JavaScript document.lastModified string shown by your present browser is :-

And new Date(document.lastModified) gives, converted to your default string format :-

With my previously preferred code, which takes that as being GMT, and assumes 2000-2099 :-

With my newer preferred code, which takes that as being LCT with YYYY :-

I will try to maintain below, manually and in standard form, some approximate idea of when it will have last been uploaded to the Web server.

2009-09-30 15:10:00 GMT approximately

If there's a major discrepancy, I've probably done a general update and forgotten to edit this box.

Reading HTTP Headers : Last-Modified

The following, if not empty, should show the actual headers sent by the server in response to a request for this page.



Note that the header Last-modified value is unambiguous.

The following string is the result of reading the header Last-Modified value.



The following is the result of reading the previous value by new Date(V), output in browser default string format, which should use your local time.



If a page is read directly from a local file, there are no headers. If it is read from a local 'Web' server, I think that there should be headers.

See Using the XML HTTP Request object - Jim Ley.

Home Page
Mail: no HTML
© Dr J R Stockton, near London, UK.
All Rights Reserved.
These pages are tested mainly with Firefox 3.0 and W3's Tidy.
This site, http://www.merlyn.demon.co.uk/, is maintained by me.
Head.