indexedDB

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2021.

グローバルの indexedDB は読み取り専用プロパティで、アプリケーションが indexed データベースの機能に非同期でアクセスするための機構を提供します。

IDBFactory オブジェクトです。

以下のコードでは、データベースを開くためのリクエストを非同期に作成し、データベースが開かれた後で、リクエストの onsuccess ハンドラーが呼び出されます。

js
let db;
function openDB() {
  const DBOpenRequest = window.indexedDB.open("toDoList");
  DBOpenRequest.onsuccess = (e) => {
    db = DBOpenRequest.result;
  };
}

仕様書

Specification
Indexed Database API 3.0
# dom-windoworworkerglobalscope-indexeddb

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
indexedDB
Available in workers

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Requires a vendor prefix or different name for use.
Has more compatibility info.

関連情報