Created
March 14, 2018 00:17
-
-
Save theredpea/5fdd4f27d1c77ef4bd27b71126d14cc0 to your computer and use it in GitHub Desktop.
Refresh events
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
<html> | |
<head> | |
<script > | |
//Each time the refresh page reloads | |
//1) a new setTimeout will be created | |
//2) the refresh-container will get the onload callback executed | |
setTimeout(function(){ window.location.reload(true); }, 5000); | |
</script> | |
</head> | |
<body> | |
Will refresh shortly | |
</body> | |
</html> |
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
<html> | |
<head> | |
<script > | |
var on_load = function(){ | |
console.log('loaded'); | |
} | |
</script> | |
</head> | |
<body> | |
<iframe src="refresh.html" onload="on_load();"> | |
</iframe> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment