Skip to content

Instantly share code, notes, and snippets.

@thechrisoshow
Created June 15, 2011 09:57
Show Gist options
  • Save thechrisoshow/1026820 to your computer and use it in GitHub Desktop.
Save thechrisoshow/1026820 to your computer and use it in GitHub Desktop.
Auto refresh the page
// Ok, document.ready is jQuery - but you get the gist
$(document).ready(function() {
setTimeout(function() {
location.href = location.href;
}, 10000);
// 10000 == 10 seconds
// Change this if you want a different refresh period
});
@james-turner
Copy link

Not to be one to rain on your parade here, but auto-refreshing the page can be done WITHOUT javascript, using the http meta refresh tag in html markup...

@thechrisoshow
Copy link
Author

@james-turner
Copy link

Sadly I noticed it a bit too late :( my bad!

@thechrisoshow
Copy link
Author

No probs - thanks for pointing it out anyhoo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment