views:

59

answers:

2

Hi,

I need to store about 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

+2  A: 

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.

Daniel Vassallo
A benefit of web storage is that cookies no longer need to be sent to the server on page requests-A minus is that the storage has to be explicitly set for every page that uses it, unlike the cookie's ability to attach on a directory level.
kennebec
@kennebec: Good points
Daniel Vassallo
this solved my problem and works great. thanks
SetiSeeker
A: 

Using a cookie to only identify a user, and storing persistent data for each user in a database is a reasonable way to go.

kennebec