views:

779

answers:

2

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...

+1  A: 

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 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.

David
What I found is that I can indeed store some data within localStorage, but just all that much. So I'm not sure it's a readonly issue.
Kevin
+8  A: 

I had the same problem and it seems like removing the key before setting it solved it.

->

function setkey(key, val){ 
  sessionStorage.removeItem(key);
  sessionStorege.setItem(key, val); 
} 
kioopi