Page 1 of 1

Refreshing browser content upon expiration of time interval

Posted: Mon Jun 17, 2002 8:44 pm
by dickey
Am I able to update data on a window based on the expiration of an interval of time?

for example: the code below displays:

Sydney, Australia - Tuesday, 18 June 2002 11:35AM (based on the PHP date function).

Code: Select all

echo "Sydney, Australia - ".date("l, j F Y g:iA");
How am I able to force this to refresh in the browser say at an interval of 1min?

Any assistance would be greatly appreciated.


- Andrew

Posted: Mon Jun 17, 2002 10:26 pm
by roninblade
you can use meta refresh

Code: Select all

<meta http-equiv="refresh" content="1">

Posted: Tue Jun 18, 2002 3:17 am
by Wayne
content="1" ... this is in seconds so for 1 minute content="60"

Posted: Tue Jun 18, 2002 3:31 am
by e+
The only problem is that unless the information is in a little white background frame when you refresh the entire page will reload :( . Most users don't like this sort of thing. Have you thought about using something client side to display the time, javascript tends to be good for this sort of thing.

Posted: Tue Jun 18, 2002 3:46 am
by roninblade
Wayne wrote:content="1" ... this is in seconds so for 1 minute content="60"
sorry bout that.