mlegg
11-29-2011, 01:52 AM
I was looking for a code to refresh a web page every day for repeat visitors in case of any changes that were made.
I would like it to work on all systems and browsers. Is this even possible?
This is one thing that I have found.
<META HTTP-EQUIV="refresh" CONTENT="86400">"
The "86400" part of the code instructs the browser to reload the current page every 86,400 seconds, which is once a day
Or would something with javascript be a better option?
<!-- Codes by Quackit.com -->
<html>
<head>
<script type="text/JavaScript">
<!--
function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}
// -->
</script>
</head>
<body onload="JavaScript:timedRefresh(5000);">
<p>This page will refresh every 5 seconds. This is because we're using the 'onload' event to call our function. We are passing in the value '5000', which equals 5 seconds.</p>
<p>But hey, try not to annoy your users too much with unnecessary page refreshes every few seconds!</p>
</body>
</html>
of course I would want to change 5000
thanks
I would like it to work on all systems and browsers. Is this even possible?
This is one thing that I have found.
<META HTTP-EQUIV="refresh" CONTENT="86400">"
The "86400" part of the code instructs the browser to reload the current page every 86,400 seconds, which is once a day
Or would something with javascript be a better option?
<!-- Codes by Quackit.com -->
<html>
<head>
<script type="text/JavaScript">
<!--
function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}
// -->
</script>
</head>
<body onload="JavaScript:timedRefresh(5000);">
<p>This page will refresh every 5 seconds. This is because we're using the 'onload' event to call our function. We are passing in the value '5000', which equals 5 seconds.</p>
<p>But hey, try not to annoy your users too much with unnecessary page refreshes every few seconds!</p>
</body>
</html>
of course I would want to change 5000
thanks