

Show HN: LocalStorage.js – LocalStorage Polyfill v2.0 - mortz
https://github.com/mortzdk/localStorage/

======
mortz
The remaining storage capacity vary a lot between the different mechanisms.
Furthermore it is possible to change the amount of capacity for the native
localStorage in some browsers as well.

The only way of testing the remaining capacity would be to try and reach the
point of full capacity and check the size of the string that reached it.

As mentioned in the README, the storage will throw an exception when you reach
the point where there is no more memory left.

------
MalcolmDiggs
Nice work. Question: is there way to check the remaining capacity/storage
available for your data? (Or check if you've run out of room)?

I imagine the amount of possible storage would vary widely based on the
underlying store mechanism right?

