Browser Client Side Storage aka a large Cookie
I need to store ab开发者_运维问答out 20-30k or data on the client side when using a website.
I was using a cookie, but this is to small for my needs.
Is there something else that I can use?
I need to be able to do this via javascript.
Server side storage is a last resort but not what I am looking for.
I need it to work for Chrome, IE and firefox.
Thanks
Ian
If by IE, you mean IE 8, then Web Storage is supported in IE 8, Firefox 2+ (officially from 3.5), Safari 4, Google Chrome 4, and Opera 10.50.
Quoting from the Wikipedia article:
Web storage can be viewed simplistically as an improvement on cookies, providing much greater storage capacity (5MB per domain in Mozilla Firefox, Google Chrome, and Opera, 10MB per storage area in Internet Explorer) and better programmatic interfaces.
Using a cookie to only identify a user, and storing persistent data for each user in a database is a reasonable way to go.
精彩评论