3 ms·
I thought localStorage was evil. http://hacks.mozilla.org/2012/03/there-is-no-simple-solution-for-local-storage/ http://hacks.mozilla.org/2012/03/there-is-no-si
by dudus 14y ago
I thought localStorage was evil.
http://hacks.mozilla.org/2012/03/there-is-no-simple-solution-for-local-storage/ http://hacks.mozilla.org/2012/03/there-is-no-simple-solution...
- Groxx 14y agoTaken in context: low performance and low reliable storage space. So, way more than sufficient for a few simple things, and not much else. IndexedDB is massive overkill for lots of things, cookies have other problems for other things, localStorage fits nicely in the middle and should be used as such. I have other reasons for disliking localStorage. Two tabs in e.g. Chrome (a few versions back, at least) can write to it and the contents from one tab can be delayed by as much as a second; one tab can read older-than-current data from another (A writes X then Y, B reads X); writes can interleave at the string level, making it possible to produce garbage data (like "abc123def" when writing "abcdef" and "123" from different tabs) - when you add this to the delay and old data problems, it's sometimes undetectable and unfixable.