I plan to use persistant localStorage in one of my projects and i have found out that the size limitation is 5 MB (chrome). I searched other frameworks which implmented the same thing, like Mootools, Dojo, Lawnchair but i couldnt find out what are their size limitations.
Does anyone know what are the size limitation is in these. And what other options are there which i can use if not the one already stated above.
If neither cookies nor localStorage seem like the right fit, there is another alternative: IndexedDB, an in-browser database system. While localStorage performs all of its methods synchronously, IndexedDB calls them all asynchronously. This allows the accessing of the data without blocking the rest of your code.
Each domain can store up to 5MB of data in LocalStorage. Also, our data isn't sent to the server when an HTTP request is made. Data in LocalStorage has no expiration time. It can be removed via JavaScript or by clearing the browser's cache.
The primary reason for introducing IndexedDB was to make a better version of localStorage. So, why not use IndexedDB in all cases? If you want to store structured data on the client side, IndexedDB is the better choice, especially since localStorage isn't built to store sensitive information.
window.localStorage - stores data with no expiration date. window.sessionStorage - stores data for one session (data is lost when the browser tab is closed)
localstorage limits are not tied to the javascript framework, but to the browser you're using. Currently specs are suggesting to limit the storage space to 5MB and this is the space maximum available on modern browser
On older versions of internet explorer (IE<8) userData behaviour (which mimics the localstorage) has a limit of 128kb for page (512kb is the maximum amount for an intranet page)
anyway for a complete list see http://dev-test.nemikor.com/web-storage/support-test/
you can use IndexedDB, but it's not supported by all browser, but it can be unlimited if user accept.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With