jakearchibald / idb

IndexedDB, but with promises
https://www.npmjs.com/package/idb
ISC License
6.31k stars 356 forks source link

Idb does not work on iOS browsers #156

Closed webstermath closed 4 years ago

webstermath commented 4 years ago

When idb is used in iOS browsers, the following error is thrown:

undefined is not an object (evaluating 'request')

I created the following pen to demonstrate this error. Just run in any iOS browser:

https://codepen.io/webstermath/pen/LYEoRzX?editors=0012

jakearchibald commented 4 years ago

Unfortunately Safari now disables browser storage when your page is within an iframe. You need to call their non-standard API to enable it https://webkit.org/blog/8124/introducing-storage-access-api/.

By the way, you're using a pretty old version of the library.