Created
November 13, 2018 19:51
-
-
Save borisBelloc/b7e1add776aca9fb631612b7895637f5 to your computer and use it in GitHub Desktop.
Javascript auto-refresh page (html / JS)
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
<!DOCTYPE html> | |
<head> | |
<title>POC : Auto-reload script</title> | |
</head> | |
<body> | |
<!-- | |
Add this script into your html page; | |
inside the <body> </body> | |
It will refresh/reload page every 3 seconds. | |
Time is in milliseconds (1000 = 1 sec) | |
--> | |
<script> | |
window.onload = function() { | |
setInterval(function() { location.reload(); } , 3000); | |
}; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment