Storing Data the Simple HTML5 Way (and a few tricks you might not have known)(html5doctor.com)
html5doctor.com
Storing Data the Simple HTML5 Way (and a few tricks you might not have known)
http://html5doctor.com/storing-data-the-simple-html5-way-and-a-few-tricks-you-might-not-have-known/
3 comments
A gotcha that's not listed is the limit on characters that you can store using localStorage: http://arty.name/localstorage.html
That's a nice test - but from what I can see it is storing a single value in localStorage that gets larger and larger.
I wonder if the behaviour is different if you have multiple smaller documents?
I wonder if the behaviour is different if you have multiple smaller documents?
There's a fixed MB limit on most browsers/devices I think.
I came across this after experiencing problems saving files to PlayBook using HTML5. The main problem seems to be size but there's also a limit on how many items you can write I think. Didn't test it too thoroughly, came up with workaround involving splitting files.
I came across this after experiencing problems saving files to PlayBook using HTML5. The main problem seems to be size but there's also a limit on how many items you can write I think. Didn't test it too thoroughly, came up with workaround involving splitting files.
[deleted]
FYI for anyone clicking that link-it crashes Chrome on my machine (version 13.0.782.112)
13.0.782.112 m (on Windows) here, didn't crash but experienced a slowdown.
So should local storage be used as a better alternative to cookies?
Cookies are shared with the server. Local storage generally is for local data only.
Just to expand on that, the sharing between the server doesnt just have privacy implication, it also means a whole ton of data that gets transferred with every request (including image / css requests etc)