iosgoogle-chromeios8indexeddbchrome-ios

Why does Chrome on iOS 8.4 say indexedDB is null? Safari has it


On iOS 8.4 (iPad Air), I am able to use IndexedDB in Safari, but in Chrome, it says it's null. Instead it has WebSQL.

Why is this the case? Is there any way to get IndexedDB on Chrome iOS or is it not added? (It's odd that it returns null and not undefined).

//Returns null
console.log( window.indexedDB );
console.log( window.webkitIndexedDB );

//Returns undefined
console.log( window.mozIndexedDB );
console.log( window.OIndexedDB );
console.log( window.msIndexedDB );

Solution

  • It is because Chrome uses the WebView and not the new WkWebView which is new in iOS8.

    iOS WebView doesn't support indexedDb (and it is readonly there so even polyfills to enable indexedDb over websql don't work)

    You can find more info on the Chrome issue tracker here: https://code.google.com/p/chromium/issues/detail?id=423444