Might want to check if localStorage is enabled before trying to use it kids. Even if there aren't many users who disable cookies by default, your site shouldn't look utterly broken (very embarrassing for you) when they visit ;)
I thought, localForage would fallback to cookies as last resort, if IndexedDB, WebSQL and localStorage aren't available, but it turned out after reading the source code, that IndexedDB > WebSQL > localStorage is the preferred handling.
Comment
It's funny that the linked Buggy is buggy! :D
Might want to check if localStorage is enabled before trying to use it kids. Even if there aren't many users who disable cookies by default, your site shouldn't look utterly broken (very embarrassing for you) when they visit ;)
Replies
What?
Are you saying that by Buggy tool isn't perfect?! I'm surprised.
I'm not entirely sure how localforage works if neither IndexedDB or localStorage is enabled.
What does cookies have to do with it?
I thought, localForage would fallback to cookies as last resort, if IndexedDB, WebSQL and localStorage aren't available, but it turned out after reading the source code, that IndexedDB > WebSQL > localStorage is the preferred handling.
As far as I understand the code from reading, localForage throws an error, if neither storage technique is usable: https://github.com/mozilla/localForage/blob/master/src/localforage.js#L314 (commit f9556e8).