Re: RFD: How To Recognize Bad Javascript Code v0.3



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:

document.write("<p>This page last updated:" + document.lastModified) +
"<\/p>");

Extra ) after lastModified.

One should add that the result will look somewhat silly in Safari
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)
.



Relevant Pages

  • Re: RFD: How To Recognize Bad Javascript Code v0.3
    ... misnomer because in practice it means "last uploaded to the server". ... It has nothing to do with "uploading". ... right options on "rsync" the file's last modified timestamp doesn't ...
    (comp.lang.javascript)
  • Re: File Permissions problem : Cry for HELP
    ... Me2resh Lists wrote: ... also about configuring the server i am uploading to, i dont think that there is something wrnog with the server cause when i upload the same files from windows, it works with no problems ... You need to change the umask used when you are saving web files. ... Depending on how you are uploading the files, ...
    (Fedora)
  • Re: RFD: How To Recognize Bad Javascript Code v0.3
    ... misnomer because in practice it means "last uploaded to the server". ... It has nothing to do with "uploading". ... index.html, while I have been editing the FAQ, has *never* been ... is by uploading a replacement, direct editing on the server, or by ...
    (comp.lang.javascript)
  • RE: Edit word doc and save back to website
    ... it uses the Frontpage server extension RPC method on ... several methods on the file uploading: WebDAV, ... If you are setting one web dav folder at the server, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: RFD: How To Recognize Bad Javascript Code v0.3
    ... misnomer because in practice it means "last uploaded to the server". ... It has nothing to do with "uploading". ... That corresponds to the meaning of "misnomer". ...
    (comp.lang.javascript)