I'm creating a webapp which uses the localStorage.
I would like to show something like: X % is used over Y Megabytes
How to calculate that?
Regards.
IE has a proprietary propery "window.localStorage.remainingSpace" which returns the remaining space in bytes. Unfortunately can't find similar functionality in any of the other browsers.
http://msdn.microsoft.com/en-us/library/cc197016(v=vs.85).aspx
I think that this will help you out Calculating usage of localStorage space
There is no way to query to browser for that exact information
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