Forum Moderators: open
if you're using word or similar programs, they seem to think something changed if you just looked at one document for more than 7 seconds ;)
I remember always having to "touch" the web.config file in IIS in order for new settings to take effect, otherwise the server uses some kind of cache which was annoying. Open in notepad, add a space, remove a space, resave.
So even though the contents of the file have not changed, the file has changed because you molested it. When it concerns cached media on the web, those timestamps really matter.
In the early stages of learning Basic and Visual basic, one of the projects is a text editor. There is usually a "Dirty" flag, a boolean true false value, set when the first document opens.
When you make a change to it, the dirty flag is set to true. When you save the document, the dirty flag is reset to false.
When you close the document, if the dirty flag is true, you are prompted to save before closing because the document is only in memory, it has not been written to a file.
These are handled by predefined functions in most libraries accessible to programmers, similar to the onChange function in Javascript. It's the same concept - you can't tell what's changed, only that it has changed.
When you paste the same word back in, human interpretation knows the file is unchanged, but because of this efficient (in terms of programming) way of managing document changes, the program does not. Using an onChange handler doesn't read the entire document . . . . get it? :-)
This can be done but it requires . . . more resources and complications for the programmer, which may or may not add up to slower running and memory problems. You open the document and you have to maintain a "copy" in memory or on hard disk, and have to compare it against the copy before closing. A lot of work for such a little thing . . . this is also why sometimes when a program crashes you will see files in your working directory: ms~01234566word.tmp (or something like it.) These are normally cleaned up when the program exits.
I have a few programs (HomeSite is one) that correctly reset when you undo or paste the words back in. But most programs don't, it's just as easy to let the user worry about it.