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 applicatio
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.
I had the same issue on my iPad running os version 3.something (sorry can remember the exact version). I upgraded the os to 4.2.1 and the problem is solved!
Seems to have been a bug in Apple's implementation of localstorage which has since been fixed.
Hey I'm getting the same issue. I tried my app on an iPad and it was spitting out this error. The only way I could replicate it on my Safari browser is if I put my computer in Private mode...
I think anytime it's in private mode the localStorage becomes read only. So I still don't have a solution, but if it helps I'd love to hear it.