![]() | |
#111
| |||
| |||
|
|
, Wed, 9 Jan 2008 09:20:15, Wayne <nospam (AT) all4me (DOT) invalid> posted: Dr J R Stockton wrote: 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.[*] Surely that depends on how the file was uploaded. For example with the right options on "rsync" the file's last modified timestamp doesn't change. (It is this filesystem timestamp that is usually used by a web server when setting the Last-Modified: header, and hence the document.lastModified value). |
|
In short it would depend on the filesystem, the upload method, and the web server, as to what date is reported. In the common case of using FTP to upload files the time stamp does change. But rsync, scp, and other tools can maintain the filesystem's modification timestamp unless the document was actually modified. |
|
Perhaps the way to deal with minor edits and last modification times is to use a CMS or similar. Or you can add version numbers to your documents that don't change for minor edits or re-uploads. (A simple RCS/CVS/SVN/whatever repository will expand special tokens in the document source into the current version number.) |
#112
| ||||||
| ||||||
|
|
In comp.lang.javascript message <Npqdnc-N5fxoTR7aRVn_vwA (AT) giganews (DOT) com>, Tue, 8 Jan 2008 14:38:44, Randy Webb <HikksNotAtHome (AT) aol (DOT) com> posted: Dr J R Stockton said the following on 1/8/2008 7:47 AM: In comp.lang.javascript message <sKKdnZ4jENr6Ph_aRVn_vwA (AT) giganews (DOT) com>, Mon, 7 Jan 2008 17:11:40, Randy Webb <HikksNotAtHome (AT) aol (DOT) com> 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. |
|
[*] I have a nice story about typos and random numbers ... |
#113
| |||
| |||
|
|
In comp.lang.javascript message <sKKdnZ4jENr6Ph_aRVn_vwA (AT) giganews (DOT) com>, Mon, 7 Jan 2008 17:11:40, Randy Webb <HikksNotAtHome (AT) aol (DOT) com> posted: document.write("<p>This page last updated:" + document.lastModified) + "<\/p>"); Extra ) after lastModified. The only way to get a date really useful to the normal reader, who will care only about whether there are significant content changes, is to type it in to the HTML when a significant change is made; and to do so in an internationally-standard format. Eschew FFF. |
#114
| |||
| |||
|
|
On Tue, 08 Jan 2008 12:47:39 +0000, Dr J R Stockton wrote: In comp.lang.javascript message <sKKdnZ4jENr6Ph_aRVn_vwA (AT) giganews (DOT) com>, Mon, 7 Jan 2008 17:11:40, Randy Webb <HikksNotAtHome (AT) aol (DOT) com> posted: document.write("<p>This page last updated:" + document.lastModified) + "<\/p>"); Extra ) after lastModified. The only way to get a date really useful to the normal reader, who will care only about whether there are significant content changes, is to type it in to the HTML when a significant change is made; and to do so in an internationally-standard format. Eschew FFF. I have a page on my site that lists used bikes, the page is automagically built from my used-bike list. During the summer we run out of used bikes. We'll go 3-4 months before we have any available on our floor. (Just not that many out there -- tight market here.) I field dozens, if not hundreds, of calls all saying that "You never updated your used bike page! What use is that!" So yes, there is a need to show that a page has been modified even if none of the contents have changed. If it will field the calls, I'll have the web page updated once a day. Touching the file on the server would be easiest... just run a cron job. |
#115
| |||
| |||
|
|
Dr J R Stockton wrote: [...] Thomas 'PointedEars' Lahn [...] posted: Dr J R Stockton wrote: [...] Randy Webb [...] posted: document.write("<p>This page last updated:" + document.lastModified) + "<\/p>"); One should add that the result will look somewhat silly in Safari 3.0.4, the current Windows beta (empty string); Correct. But maybe that is because it is only a beta. The reason is like Mr Worthing's early location. Sorry, I don't understand. |
|
The fact remains that the string is empty in Sf 3.0.4. It is empty in the _beta_ version. Don't you think that this could *maybe* be a bug that is fixed for the release? |
|
and that lastModified is a misnomer because in practice it means "last uploaded to the server". Incorrect. The `lastModified' property shows the modification time of the resource, essentially the value of the `Last-Modified' HTTP header. The upload time to the server does not enter into it, although the modification timestamp of a file is usually also set/updated when it is created or overwritten in the filesystem as it would happen during an upload. You are once more revealing your background as an unintelligent product of a technical college; one who can regurgitate material but cannot think effectively. In many respects, you and Randy are equals. You have stated that the `lastModified' property value would mean the date of the last upload to the server, which is simply wrong. It would look better on your record if you had the courage to admit your error that instead of hiding behind your inept attempts at ad hominem attacks. But I guess that is too much to ask for. |
#116
| |||
| |||
|
|
Dr J R Stockton said the following on 1/9/2008 8:52 AM: In comp.lang.javascript message <Npqdnc-N5fxoTR7aRVn_vwA (AT) giganews (DOT) com>, Tue, 8 Jan 2008 14:38:44, Randy Webb <HikksNotAtHome (AT) aol (DOT) com> posted: Dr J R Stockton said the following on 1/8/2008 7:47 AM: 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. |
#117
| |||
| |||
|
|
, Wed, 9 Jan 2008 23:35:57, Jeremy J Starcher <r3jjs (AT) yahoo (DOT) com> posted: I have a page on my site that lists used bikes, the page is automagically built from my used-bike list. During the summer we run out of used bikes. We'll go 3-4 months before we have any available on our floor. (Just not that many out there -- tight market here.) I field dozens, if not hundreds, of calls all saying that "You never updated your used bike page! What use is that!" So yes, there is a need to show that a page has been modified even if none of the contents have changed. If it will field the calls, I'll have the web page updated once a day. Touching the file on the server would be easiest... just run a cron job. |
#118
| |||||
| |||||
|
|
In comp.lang.javascript message <RJ-dnaI8yOEa1hjaRVn_vwA (AT) giganews (DOT) com>, Wed, 9 Jan 2008 17:34:28, Randy Webb <HikksNotAtHome (AT) aol (DOT) com> posted: Dr J R Stockton said the following on 1/9/2008 8:52 AM: In comp.lang.javascript message <Npqdnc-N5fxoTR7aRVn_vwA (AT) giganews (DOT) com>, Tue, 8 Jan 2008 14:38:44, Randy Webb <HikksNotAtHome (AT) aol (DOT) com> posted: Dr J R Stockton said the following on 1/8/2008 7:47 AM: 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. Indeed, according to its definition. |
|
But not according to the meaning of its identifier, |
|
and such identifiers should be correctly meaningful. |
|
That corresponds to the meaning of "misnomer". |
|
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. That is how it is commonly used on the Web, displayed in a manner that will be taken by the normal reader as implying a change of potential significance to himself. |
#119
| |||||
| |||||
|
|
Dr J R Stockton said the following on 1/10/2008 7:13 AM: But not according to the meaning of its identifier, No, the identifier is *very* indicative of what it gives you. It gives you the date the document was last modified. |
|
and such identifiers should be correctly meaningful. And that identifier is. |
|
That corresponds to the meaning of "misnomer". document.lastModified is nowhere near a misnomer. It is precisely what it says it is. |
|
You are the one that seems to think it always indicates "potential significance" which isn't what the property holds. |
|
Out of curiosity though, could you explain what rules you think an OS should follow to know whether a document has truly been modified - according to your expectations - versus minor corrections? |
#120
| |||
| |||
|
|
So javascript's try/catch implies the need to catch all exceptions and then identify the exception caught to see if it is an expectation that can be handled, and re-throw those that cannot be handled. |
|
But the ability to identify exceptions is so limited/problematic that you would be hard pressed to find any single example of anyone actually coding this. |
![]() |
| Thread Tools | |
| Display Modes | |
| |