Created
August 2, 2013 12:23
-
-
Save cou929/6139492 to your computer and use it in GitHub Desktop.
sample code to test reloading and caching.
http://please-sleep.cou929.nu/super-reload-and-cache.html
This file contains 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> | |
<body onload="onload()"> | |
<img src="http://please-sleep.cou929.nu/images/twitter-48.png?normal"/> | |
<iframe src="./test.html?noraml"></iframe> | |
<script src="./test.js?noraml"></script> | |
<script> | |
// img | |
(new Image()).src = 'http://please-sleep.cou929.nu/images/twitter-48.png?dynamic'; | |
// iframe | |
var iframe = document.createElement('iframe'); | |
iframe.src = './test.html?dynamic'; | |
document.body.appendChild(iframe); | |
// script | |
var script = document.createElement('script'); | |
script.src = './test.js?dynamic'; | |
document.body.appendChild(script); | |
function onload() { | |
// img | |
(new Image()).src = 'http://please-sleep.cou929.nu/images/twitter-48.png?onload'; | |
// iframe | |
var iframe = document.createElement('iframe'); | |
iframe.src = './test.html?onlaod'; | |
document.body.appendChild(iframe); | |
// script | |
var script = document.createElement('script'); | |
script.src = './test.js?onload'; | |
document.body.appendChild(script); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment