-
-
Save biodata-alfarizi/b0340905a9989c4b123c to your computer and use it in GitHub Desktop.
localStorage bomb to test your browser on how many characters your browser able to save
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> | |
<head> | |
<title>Al-Farizi, Fuse</title> | |
<meta charset="utf-8"> | |
<script> | |
localStorage.setItem("fuse", "-"); | |
while(true) { | |
var fuse = localStorage.getItem("fuse"); | |
try { | |
localStorage.setItem("fuse", fuse + fuse); | |
} catch(e) { | |
alert("Your browser blew up at " + fuse.length + " with exception: " + e); | |
break; | |
} | |
} | |
localStorage.removeItem("fuse"); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment