Skip to content

Instantly share code, notes, and snippets.

@davidcornu
Created January 16, 2012 17:09
Show Gist options
  • Save davidcornu/1621829 to your computer and use it in GitHub Desktop.
Save davidcornu/1621829 to your computer and use it in GitHub Desktop.
Reload a page every 5 seconds (Useful for HAProxy)
document.write('<!DOCTYPE html><html><head><script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"><\/script></head><body>Loading...</body></html>');
setInterval(function(){
jQuery('body').load(window.location.href);
}, 5000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment