[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

How do we know when a page has been updated

Tony Johansson

2/23/2015 1:44:00 PM

How can I know when a certain page was last updated?

//Tony
4 Answers

ram

2/23/2015 2:02:00 PM

0

"Tony Johansson" <johansson.andersson@telia.com> writes:
>How can I know when a certain page was last updated?

(Where is the connection to the world's most excellent
programming language?)

For special cases, it might help to retrieve copies of the
page as fast as possible (like every 10 ms), define
»update«, and then evaluate the retrieved pages according to
the definition. Then have the system write to a log (that
you can read) when an update was detected.

However, when a page is updated and then after 1 ms is
replaced by the previous state, the update might be undetected.

A web server might send different contents to visitors
depending on request details (like IP address, language,
browser). It is possible, that the contents send to some
visitors is updated, while the contents send to others is
not updated. So, there is no universal »page«.

When a serial number is embedded on every page served, the
page, technically said, is updated every time, but such an
update might not be relevant to you.

Thomas 'PointedEars' Lahn

2/23/2015 2:46:00 PM

0

Tony Johansson wrote:

> How can I know when a certain page was last updated?

*Why* do you not read the FAQ?

--
PointedEars
FAQ: <http://PointedEars.... | SVN: <http://PointedEars.de...
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-...
Please do not cc me. / Bitte keine Kopien per E-Mail.

Michael Haufe (\"TNO\")

2/23/2015 4:57:00 PM

0

On Monday, February 23, 2015 at 7:44:14 AM UTC-6, Tony Johansson wrote:
> How can I know when a certain page was last updated?


Look at document.lastModified

....but it will most likely not give you any useful information.

Evertjan.

2/23/2015 5:04:00 PM

0

"Michael Haufe (TNO)" <tno@thenewobjective.com> wrote on 23 feb 2015 in
comp.lang.javascript:

> On Monday, February 23, 2015 at 7:44:14 AM UTC-6, Tony Johansson wrote:
>> How can I know when a certain page was last updated?

That depends on what you mean by "updated".

> Look at document.lastModified
>
> ...but it will most likely not give you any useful information.

.... because serverside coded pages are made anew every time they are called,
so their document.lastModified, showing the time in the HEAD, is nearly
server "now".

However, you might get a relyable date/time with the stream of an
oldfashionned static html file.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)