FAQ : Frequently Asked Questions
FAQ Table of contents
blue line
15. Q:  How can I automatically refresh a Web page?

A:  You may use some JavaScript to have a Web page automatically refreshed after a given number of seconds (milliseconds, to be correct).

Please read about the setTimeout method of object window:
       setTimeout(function, msec[, arg1[, ..., argN]])

For example, to refresh your page every 25 seconds, add the following to your page source:

<head>
<script language=JavaScript>
function reloadPage() {
        window.location=window.location
}
function refreshPage() {
        setTimeout('reloadPage()',25000)
}
</script>
</head>
<body   onLoad=refreshPage()>

By the way, this page ... refreshes every 60 seconds!

  The last refresh of this page was at  

blue line