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



Dr J R Stockton said the following on 1/9/2008 8:52 AM:
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.

Not near as impressive as your lack of the ability to understand simple English.

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.

Precisely. And that is the date that lastModified reads. And it is *precisely* what it is supposed to read. Any argument that says it should read otherwise is just plain wrong.

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.

If you use document.lastModified (or the Last-Modified header), to indicate that to the user, then you deserve what you get. Because that is precisely the date it holds, the date it was last modified. Irregardless of how/why it was modified.

It is also a disservice if the change is too slight to
matter to the reader, for example correcting non-misleading typos.[*]

Then you prefer to lie to them and tell them it was last modified before it was last modified? How intuitive and honest of you.

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.

And please remember what Randy Webb explicitly wrote about a gnats ass and "Thats nice[1]".

[*] I have a nice story about typos and random numbers ...

If it is as dumb and convoluted as your story about document.lastModified, then keep it to yourself.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
.



Relevant Pages

  • Re: Publish to the Web with Publisher 2003
    ... You don't really say what the problem is regarding the uploading, ... But try the FAQ first. ... David Bartosik - MS MVP ... > publication will not upload properly to my server. ...
    (microsoft.public.publisher.webdesign)
  • 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". ... is by uploading a replacement, direct editing on the server, or by ... It is also a disservice if the change is too slight to ...
    (comp.lang.javascript)
  • Re: RFD: How To Recognize Bad Javascript Code v0.3
    ... misnomer because in practice it means "last uploaded to the server". ... Whether that modification is by uploading a replacement, direct editing on the server, or by being generated on the server. ...
    (comp.lang.javascript)
  • alt.2600 FAQ Revision .014 (1/4)
    ... The "Survival Guide" is a supplement to this FAQ and should be considered to be part of it. ... How do I attack a remote network across the Internet? ... This involves translations in which several different values are represented by the same character, which is why Unix passwords cannot be decrypted. ... The audit server database is called SYS$COMMON:VMS$AUDIT_SERVER.DAT and the audit log file is SYS$COMMON:SECURITY.AUDIT$JOURNAL. ...
    (alt.2600)
  • Re: Mail sent through IIS virtual SMTP server not arriving
    ... Juan T. Llibre, asp.net MVP ... asp.net faq: http://asp.net.do/faq/ ... does not respond to a connection attempt from my smtp virtual server. ... but I really don't know how to setup a virtual domain for my smtp ...
    (microsoft.public.dotnet.framework.aspnet)