Feedback on: Timestamping an HTML Document
There is a third option worth noting, programs that allow for "pre-publication includes".
Case in point: CSE's latest HTML Validator has a "template" function that works like SSI, but is done on your production machine prior to publication. A piece of code added to the HTML file and then, prior to publication, it is processed. If the include you specify contains the symbol $"CURRENTDATE" or $"CURRENTTIME" that information is added.
I use it for much more than "last modified", but it certainly works for that too. This is the strongest production machine side implementation of 'includes' (using the editor of your choice) I've seen, and I've been scouring the web for them for some time!
NOTE: Also great for including Javascripts contained in -head- over multiple pages... even DW doesn't do that.
Worth:
Worth reading
Length:
Just right
Technical:
Just right
Comments:
Pankaj,
At http://www.irt.org/articles/js130/index.htm you say
"Limitations
Unfortunately, it seems that the JavaScript technique doesn't work if the file is already using SSIs (say for some other purpose).
That is, the above technique will not work if the file is of the type *.shtml and includes
document.write(document.lastModified)"
I can remove the 'it seems' for you. document.lastModified returns that date as indicated by the "last-modified:" HTTP header when the file is retrieved. Many servers that implement SSI do not return this header, because it would be necessary to parse the whole of the 'included' document tree to work out which file was the last modified.
Whilst some servers will return this field, the majority will not, and hence document.lastModified will not work on these servers.
HTH,
Greg
Worth:
Very worth reading
Comments:
1. How can I add a timestamp to a link, so when a link is pointed to it will show the viewer the last time the file that the
link points to was updated.
2. Do you know an INTERNET address for a tutorial program for PERL for beginners?
Thank you.
Worth:
Very worth reading
Comments:
Great article.
Describes in a logical fashion and self contained.
Tx.
Worth:
Very worth reading
Comments:
Yes, i met the same problem. The last modified date of the HTML document is updated each time using i press Refresh button.
Any suggestion to improve it?
Cheers,
Connie Chan