
Storing Data the Simple HTML5 Way (and a few tricks you might not have known) - joshuacc
http://html5doctor.com/storing-data-the-simple-html5-way-and-a-few-tricks-you-might-not-have-known/
======
a3camero
A gotcha that's not listed is the limit on characters that you can store using
localStorage: <http://arty.name/localstorage.html>

~~~
arethuza
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?

~~~
a3camero
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.

------
y3di
So should local storage be used as a better alternative to cookies?

~~~
sp332
Cookies are shared with the server. Local storage generally is for local data
only.

~~~
daleharvey
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)

