Refresh WebPage periodically

Cygnus picture Cygnus · Jun 8, 2012 · Viewed 12.3k times · Source

My requirement is that i have a .php page that has to display some graphs/data based on data from a database. I would like refresh the page automatically and periodically so that graphs/data can be updated, as the data is obtained only on loading of the page. How can i do this ?

Answer

KiiroSora09 picture KiiroSora09 · Jun 8, 2012

Maybe you can try the setTimeout javascript method

setTimeout("location.reload(true);",timeoutPeriod);

this would refresh the page on every timeoutPeriod interval.