I trying to use Client Side Storage available in HTML5 (localStorage) for Iphone Application , and I’m completely aware of the “QUOTA” associated for localStorage(which is currently 5MB).
Now the problem is for a my application (with no data previously stored) . trying to store the data in localStorage is resulting in QUOTA_EXCEEDED_ERR although the size of the overall data is way less than 5 MB (~ 4Kb to be precise ( found using chrome web inspector in normal browser) )
Can anyone Share some light on this that how a data weigh 4Kb is resulting in QUOTA_EXCEEDED_ERR when the upper limit for the same 5MB
Note that the issue is only occurring for iPhone ,all the browsers and even the iPhone Simulator doesn’t prompt with QUOTA_EXCEEDED_ERR error
iPhone currently is picture is iPhone 4 .
Go into Settings->Safari and check to see if private browsing is on. If it is, local storage will not be able to store anything. Here’s some basic code to check local storage for you:
Also, how are you setting it? Are you using
localStorage.setItem(key, val), or tryinglocalStorage(key, val)? You’re problem might be coming from setting it incorrectly