I've been using <meta http-equiv="refresh" content="5">
for a little while to auto update my pages, and then I found that clicking refresh before the 5 seconds is up causes the auto update not to work, at least in IE8.
So I decided to research the <meta>
tag and found, according to wikipedia: " Auto refreshing via a META element has been deprecated for more than ten years [5] and recognized as problematic before that ".
So, what SHOULD I be using to auto update my pages? (I am guessing it will be a javy scripty kinda thingy.)
Thanks bunches in advance!!!!
use
<script>
setTimeout("window.location.reload(true);",5000);
</script>
or
<input type="button" value="Reload Page" onClick="window.location.reload()">
Yeah, you can do it easily with javascript.
Something like that:
function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}
I don't know what you really want to do, but refreshing the entire page might be overkill.
Consider using JQuery/AJAX to refresh only a part of your page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With