On 28-Aug-06, at 11:49 AM, Bob Ippolito wrote:
> Sounds like a good idea. Generalized storage would be fine by me, but
> only if the representation is JSON. It would be nice if the cookie
> storage could tell you (by exception or true/false return value) if
> said data didn't fit in a cookie for whatever reason.
How does this API look:
MochiKit.Storage.retrieve(key)
MochiKit.Storage.store(
key, value
or {key: value, key1: value1, ...}
or [[key, value], [key1, value1]]
) - throws when full or unavailable
MochiKit.Storage.destroy(key) - delete()s the key.
MochiKit.Storage.expires(date) - defaults to discard when browser
session is over. Makes sense for Cookies, but what about FormStorage
or some other technique?
MochiKit.Storage.setProvider(string) - defaults to Cookie.
MochiKit.Storage.storageUsed()
MochiKit.Storage.storageFree()
Beau
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---