constantinescumircea / simpleStorage

Cross-browser key-value store database to store data locally in the browser. Simpler fork of jStorage
The Unlicense
305 stars 53 forks source link

Better detection on Safari #27

Open mariusa opened 8 years ago

mariusa commented 8 years ago

Hello,

Using localStorage on Safari on iOS will result in JS errors when in private mode: http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-safari-quota-exceeded-err-dom-exception-22-an http://stackoverflow.com/questions/13208878/localstorage-not-accessible-in-ios-6-safari

Would you please consider a better detection of localStorage actually working, and if not, handle as if not available instead of erroring? e.g. simpleStorage.get() could return undefined

Thanks

ZaDarkSide commented 7 years ago

Can you please post the exact error you get?

The _checkAvailability() function takes care of feature detection. simpleStorage.get() should return undefined, does this not happen?