Skip to content

Instantly share code, notes, and snippets.



Last active Aug 29, 2015
What would you like to do?
Used to show broken localStorage in IE11
<title>LocalStorage fundamentally broken in IE11</title>
String length: <input id="length" type="text" value="2000" /><br />
<button onclick="set(null);">Clear</button>
<button onclick="store('A');">Store w/ A</button>
<button onclick="store('B');">Store w/ B</button>
<button onclick="show();">Show value</button>
<div id="output"></div>
function set(value) {
localStorage.setItem('stuff', value);
function store(prefix)
var length = parseInt(document.getElementById('length').value);
var value = prefix + new Array(length).join('a');
function show() {
document.getElementById('output').textContent = localStorage.getItem('stuff');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment