Skip to content

Instantly share code, notes, and snippets.

@jbgutierrez
Created May 6, 2015 15:47
Show Gist options
  • Save jbgutierrez/1c481f95e18ca9764b40 to your computer and use it in GitHub Desktop.
Save jbgutierrez/1c481f95e18ca9764b40 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head></head>
<body>
<script>
document.write(+new Date);
parent.leak();
</script>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head> </head>
<body>
<h1>Zombies <span id="zombies">0</span> </h1>
<h2><a href="javascript:navigate()">Navigate</a></h2>
<iframe id="frame" src="frame.html"></iframe>
<script>
var lag, zombies = 0, usualTransitionTime = 100;
function navigate()
{
clearTimeout(lag);
lag = setTimeout(function(){
document.getElementById('frame').src = "frame.html?" + +new Date;
}, zombies * usualTransitionTime);
}
function leak() {
zombies++;
document.getElementById('zombies').innerHTML = zombies;
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment