I try to steer clear of modifying a page without the user triggering the change, much less automatically refresh or redirect a page. There are times when automatically refreshing the page is important, like when you pull up game play-by-play pages on NFL.com or ESPN.com. Whatever your reason for automatically refreshing the page, keep one thing in mind: auto-refresh only pages that have little interaction -- nothing more than a click.
var timer = null;
window.location = 'http://domain.com/page.php';
<body onload="timer = setTimeout('auto_reload()',10000);">
The META Tag Method
The following refreshes the page every 30 seconds.
<meta http-equiv="refresh" content="30" />
New York, NY · October 12-14
Get 20% off with
This article serves as a point-by-point...
David asked me if I'd be up for a guest post picking out some of my favorite Pens from CodePen. A daunting task! There are so many! I managed to pick a few though that have blown me away over the past few months. If you...
One thing I love about love about Safari on the iPhone is that Safari provides a darkened background effect when you click a link. It's the most subtle of details but just enforces than an action is taking place. So why not implement that...