I have a web application written in JavaScript that runs successfully on the desktop via Safari as well as on the iPhone.
We are looking at porting this application to the iPad and we are running into a problem where we are seeing QUOTA_EXCEEDED_ERR when storing a relatively small amount of data within the localStorage on the device. I know what this error means, but I just don't think I'm storing all that much data.
Is anyone else doing something similar? And seeing/not seeing this problem?
Kevin...
I had the same problem and it seems like removing the key before setting it solved it.
function setkey(key, val){
sessionStorage.removeItem(key);
sessionStorage.setItem(key, val);
}
it's not a bug, the user can go to the settings of there iphone and then choose safari. there is a option to set private brouwsing. default is on so storage works but some disable it. so you should create a message in your app telling theme to enable it.
If you use the way removing storage data before set it - it would be very slow in some browsers. Removing data is 1.5 times slower than set it (strings about 50 signs). Tried on FF 3.6 (Ubuntu) - browser works very slow with SqlLite. So, do this hack only for iPad devices.
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