Re: RFD: How To Recognize Bad Javascript Code v0.3
- From: Dr J R Stockton <jrs@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 9 Jan 2008 13:52:55 +0000
In comp.lang.javascript message <Npqdnc-N5fxoTR7aRVn_vwA@xxxxxxxxxxxx>,
Tue, 8 Jan 2008 14:38:44, Randy Webb <HikksNotAtHome@xxxxxxx> posted:
Dr J R Stockton said the following on 1/8/2008 7:47 AM:
In comp.lang.javascript message <sKKdnZ4jENr6Ph_aRVn_vwA@xxxxxxxxxxxx>,
Mon, 7 Jan 2008 17:11:40, Randy Webb <HikksNotAtHome@xxxxxxx> posted:
One should add that the result will look somewhat silly in Safari
document.write("<p>This page last updated:" + document.lastModified) +
"<\/p>");
Extra ) after lastModified.
3.0.4,
the current Windows beta (empty string); and that lastModified is a
misnomer because in practice it means "last uploaded to the server".
It is not a misnomer. It reflects the date the document you are viewing
was last modified. It has nothing to do with "uploading". The FAQ
index.html, while I have been editing the FAQ, has *never* been
uploaded. The date that document.lastModified gives is exactly that,
the date that the document was last Modified. Whether that modification
is by uploading a replacement, direct editing on the server, or by
being generated on the server.
Your lack of insight is most impressive.
When a document is, for whatever reason, re-uploaded to a server
(perhaps because of a change of server, for instance), it gets a new
Last-Modified header. But if the content of the document, as seen by
the user, is unchanged, it is a disservice to assert that there has been
a modification. It is also a disservice if the change is too slight to
matter to the reader, for example correcting non-misleading typos.[*]
Please remember what WSC is alleged to have said about Americans (and if
possible provide an authoritative reference); in this respect, the task
is as yet incomplete.
ASIDE : I now have an improved Leading Zero function, LZ; it is the
fastest (in IE6) of three which all, AFAICS, always give the right
answer. See <js-tests.htm#LZ>.
function LZ(x) { return (x!=null&&x<10&&x>=0?"0":"") + x }
[*] I have a nice story about typos and random numbers ...
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
.
- Follow-Ups:
- Re: RFD: How To Recognize Bad Javascript Code v0.3
- From: Randy Webb
- Re: RFD: How To Recognize Bad Javascript Code v0.3
- From: Wayne
- Re: RFD: How To Recognize Bad Javascript Code v0.3
- References:
- RFD: How To Recognize Bad Javascript Code
- From: Jeremy J Starcher
- Re: RFD: How To Recognize Bad Javascript Code
- From: Jeremy J Starcher
- RFD: How To Recognize Bad Javascript Code v0.3
- From: Jeremy J Starcher
- Re: RFD: How To Recognize Bad Javascript Code v0.3
- From: Randy Webb
- Re: RFD: How To Recognize Bad Javascript Code v0.3
- From: Dr J R Stockton
- Re: RFD: How To Recognize Bad Javascript Code v0.3
- From: Randy Webb
- RFD: How To Recognize Bad Javascript Code
- Prev by Date: XML Node, HTML Node
- Next by Date: Re: RFD: How To Recognize Bad Javascript Code v0.3
- Previous by thread: Re: RFD: How To Recognize Bad Javascript Code v0.3
- Next by thread: Re: RFD: How To Recognize Bad Javascript Code v0.3
- Index(es):
Relevant Pages
|