gsklee / ngStorage

localStorage and sessionStorage done right for AngularJS.
MIT License
2.33k stars 461 forks source link

Check if sessionStorage is supported on Safari #213

Closed krtek closed 8 years ago

krtek commented 8 years ago

Session storage in Safari in private mode is also throwing QUOTA_EXCEEDED_ERR: DOM Exception 22 error

krtek commented 8 years ago

Angular 1.5 is causing failing tests in PhantomJS. First you have to merge PR 212 then all tests will pass correctly.

OscarBarrett commented 8 years ago

Just to add a reference to the open issue: #210

Also, karma-safari-private-launcher can be used to test private browsing mode.

In the Gruntfile:

if (process.platform == 'darwin') {
  browsers.push('SafariPrivate');
}
angeloocana commented 8 years ago

Hi Lukáš Marek,

I'm with the same problem on old Iphones. I changed my code like your pull request, then iphone is not throwing errors anymore, but some times it's returning nothing and breaking my app.

changed version: staffgeist.azurewebsites.net current version: staffgeist.com

thanks

OscarBarrett commented 8 years ago

@gsklee Any chance you could look at this one?

gsklee commented 8 years ago

@krtek @OscarBarrett Should work now.

mer10z commented 7 years ago

I'm still getting the quota exceeded error from line 169:

webStorage.setItem(storageKeyPrefix + k, serializer(v));

I can see in my logs that for this user, the warning message "This browser does not support Web Storage!" is also logged, so I would expect no further quota exceeded error logs.