Skip to content Skip to sidebar Skip to footer

How To Get Indexeddb To Work In Ie11?

I want to use indexedDB in my IE11, but it seems to be undefined. This is the code: Title of the document

Solution 1:

I suspect you're trying to do this from a local file (e.g. c:\test.html) rather than an HTTP resource. IE probably restricts access to the API from file (or non-HTTP) origins.

If I save your content locally to a file it alerts as you noted in IE. If I serve the content via a server, it works correctly.

A simpler example:

<script>alert(window.indexedDB);
</script>
  • Local file: undefined
  • Served: [object IDBFactory]

For example:

alert(window.indexedDB);

Post a Comment for "How To Get Indexeddb To Work In Ie11?"