localForage: Safari 10 detection for indexedDB fails
(Desktop) Safari 9.1 detection for indexedDB seems to fail at this conditional:
// We mimic PouchDB here; just UA test for Safari (which, as of
// iOS 8/Yosemite, doesn't properly support IndexedDB).
// IndexedDB support is broken and different from Blink's.
// This is faster than the test case (and it's sync), so we just
// do this. *SIGH*
// http://bl.ocks.org/nolanlawson/raw/c83e9039edf2278047e9/
//
// We test for openDatabase because IE Mobile identifies itself
// as Safari. Oh the lulz...
if (typeof openDatabase !== 'undefined' && typeof navigator !== 'undefined' &&
navigator.userAgent &&
/Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent)) {
return false;
}
https://github.com/localForage/localForage/blob/master/src/utils/isIndexedDBValid.js#L19-L23
IndexedDB does work, but because it doesn’t pass this conditional it falls back to webSQL which doesn’t seem to work in my setup.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19 (10 by maintainers)
OK , I will be waiting for your feedback. Also, since you will be testing on safari, could you also provide some feedback on the jsfiddle example found in the last comment of #352. PS: I hope I’m not asking too much from you.