1

My code:

var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
if(indexedDB) {
  const request = window.indexedDB.open("library", 1);
  let db;

  request.onupgradeneeded = function() {
    console.log("Upgrade")
  };

  request.onsuccess = function() {
    db = request.result;
    console.log(db)
  };
  request.onerror = (event) => {
    console.log('error: ',event)
  }
}

I got error in console:

console error

How can I connet to IndexedDB in IE11 ?

5
  • 2
    Do you really need IE11 support? It's support for indexedDB is patchy at best: caniuse.com/?search=indexeddb Commented Mar 13, 2023 at 8:57
  • Unfortunately we should support our app on IE11 too
    – Kirill
    Commented Mar 13, 2023 at 9:02
  • 2
    IE11 has fallen to around 0.5% usage worldwide, it is no longer supported and Microsoft is actively removing it. By June this year it will be gone everywhere but a few isolated places on the Internet. Whatever effort you put into this now will be wasted. Commented Mar 13, 2023 at 9:09
  • 1
    Are you referring to Internet Explorer 11, the browser the Microsoft officially killed of a few weeks ago and is actively uninstalling them from existing Windows installations?
    – Terry
    Commented Mar 13, 2023 at 9:19
  • "Unfortunately we should support our app on IE11 too" I would actively push back on this to those who are insisting on this. What versions of Chrome, Firefox, Safari, Opera, etc. are you also supporting. I'd bet they are nowhere near as old as IE 11!
    – phuzi
    Commented Mar 13, 2023 at 11:02

0