If you've read my previous post on cookie size limitations in browsers; you would understand this cannot be done at all. To add to the problem, this project being a web plugin to an existing site, needs to share the cookie space with them and their already existing plugins. We were really concerned if we end up messing with their cookies or they end up messing up with ours (given the size limitation).
And then we found persistjs. You should read all the good reasons why you should use persistjs here. In short, it tries to find multiple possible way to store and retrieve data on the client side. If one method fails, it fall backs to the next available method. The last being cookies and before that flash. This was a relief to us because web stats show ~99% browsers support flash and ~70-80% already have flash plugin installed. In all good/bad probablities, we will end up with a browser which supports one of the client side storage supported by persistjs. It currently supports the following:
- flash: Flash 8 persistent storage.
- gears: Google Gears-based persistent storage.
- localstorage: HTML5 draft storage.
- whatwg_db: HTML5 draft database storage.
- globalstorage: HTML5 draft storage (old spec).
- ie: Internet Explorer userdata behaviors.
- cookie: Cookie-based persistent storage.
Not only that, if we land up to a backend other than the cookie; minimum supported size is ~100KB. Good enough for us. :-)
Thats it for now. We seem to be in good shape on this side. Soon we will be going for full throttle load testing. Will share the results then. Till then, merry christmas (belated) and happy new year (in advance). [;-)]
No comments:
Post a Comment