Is anyone else receiving a QUOTA_EXCEEDED_ERR on their iPad when accessing localStorage?

前端 未结 5 1355
终归单人心
终归单人心 2020-12-29 04:03

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

相关标签:
5条回答
  • 2020-12-29 04:43

    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);
    }
    
    0 讨论(0)
  • 2020-12-29 04:48

    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.

    0 讨论(0)
  • 2020-12-29 04:49

    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.

    0 讨论(0)
  • 2020-12-29 05:08

    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.

    0 讨论(0)
  • 2020-12-29 05:08

    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.

    0 讨论(0)
提交回复
热议问题