Archived

This topic is now archived and is closed to further replies.

AndreTheGiant

website last updated when?

Recommended Posts

Is there some kind of standard or universal way to determine when a specific web page was last updated/modified? I am currently relying on the webmasters to have something near the bottom of the page that says "last updated 22/10/03" or something. Which not many webpages have. I want to know if there is a better way to determine this without relying on the webmaster telling you. Like some sort of way to tell when the file was last saved, much like how windows has a "last modified" info associated with each file. I dont care what language it takes, as long as it is possible. Java, javascript, vbscript, perl, c, whatever.

Share this post


Link to post
Share on other sites
HTTP response headers include the Last-Modified field.
Any language capable of using sockets somehow is able to read this field.
By "somehow" i mean requesting some data from the server on protocol level.

-Nik

EDIT:
Note that server software determines this value, and it may not exactly reflect the actual file update time, even though on static content it often does.

[edited by - Nik02 on October 22, 2003 4:01:54 PM]

Share this post


Link to post
Share on other sites
As mentioned, the HTTP protocol gas the Last-Modified header, that is set by the server in the response on most resources. That does not work, however, on ''dynamic'' documents (such as here at GameDev) as they are generated on the fly, and this header is not set.

There is a plugin for Mozilla Firebird called "Live HTTP Headers", but the plugin provider''s site (www.mozdev.org) seems to be dowd at the moment. Google for it, and get it when it''s available.

Share this post


Link to post
Share on other sites