Created
June 15, 2011 09:57
-
-
Save thechrisoshow/1026820 to your computer and use it in GitHub Desktop.
Auto refresh the page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 | |
| }); |
Author
Yep! I wrote an update to the blog post: http://thechrisoshow.com/2011/06/15/auto-refresh-a-webpage-with-javascript/
Sadly I noticed it a bit too late :( my bad!
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
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...