0
Trouble with Localstorage reading
I have a script that generates 400 localstorage strings: for(i=1;i<401;i++){ localStorage.setItem(i,'empty'); } This works. And I have a script that should read this data: for(i=1;i<401;i++){ console.log(localStorage.getItem(i)); ... } When I run it, it logs only 23 times instead of 400. What's the problem?
4 Respostas
+ 2
You should optimize your code workflow because 400 records is too much for localStorage! You should try to insert these entries in Array and then put this array in localStorage as string.
+ 1
Hi Manu
This seems to work for me.
What platform are you using?
+ 1
Mike, what do you mean with platform?
@all, i solved the problem.
Damyan, i will fix this later. But now, it works fine for me.
0
Some known issues with Safari, but would be good to know what you did to fix for others