Donate SIGN UP

html/java help please!

Avatar Image
~Vulpine~ | 20:38 Tue 25th Jul 2006 | Technology
4 Answers
is there a code that i can put in my web page which tells the viewer when the page was last updated?
Gravatar

Answers

1 to 4 of 4rss feed

Best Answer

No best answer has yet been selected by ~Vulpine~. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
If you are using ASP through IIS
On the Server side script you can use the
Session & Response Objects

The Session Object has a collection of objects/items, one of them (off the top of my head) actually has a property of LastUpdated

If you run in to problems with cache the following may help

Response.ExpiresAbsolute - Sets a date/time when the
cached page on the client will expire

Response.Expires - Sets how long (minutes) before the page expires on the client

Someone correct me If my memory fails

Hope this helps
Yeah but if you don't have ASP or another server-side scripting technology you could use the javascript:

<script type="text/javascript">document.write (document.lastModified);</script>

which would produce something like this on my system:
07/25/2006 22:46:32
Yes, Plinth is spot on, I knew there was an easier way :-)
Question Author
Wow, thanks you two - that's fantastic. I thought I was going to hit a dead end with this one. Ta very much! :)

1 to 4 of 4rss feed

Do you know the answer?

html/java help please!

Answer Question >>