Web/API/WindowOrWorkerGlobalScope/indexedDB

From Get docs


The indexedDB read-only property of the WindowOrWorkerGlobalScope mixin provides a mechanism for applications to asynchronously access the capabilities of indexed databases.

Syntax

var IDBFactory = self.indexedDB;

Value

An IDBFactory object.

Example

The following code creates a request for a database to be opened asychronously, after which the database is opened when the request's onsuccess handler is fired:

var db;
function openDB() {
 var DBOpenRequest = window.indexedDB.open('toDoList');
 DBOpenRequest.onsuccess = function(e) {
   db = DBOpenRequest.result;
 }
}

Specifications

Specification Status Comment
Indexed Database API DraftThe definition of 'indexedDB' in that specification. Recommendation Defined in a WindowOrWorkerGlobalScope partial in the newest spec.
Indexed Database API 2.0The definition of 'indexedDB' in that specification. Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
indexedDB Chrome

Full support 24

Edge

Full support 12

Firefox Full support 16


Full support 16


Full support 10

Prefixed'

Prefixed' Implemented with the vendor prefix: moz Full support 52

Notes'

Notes' indexedDB now defined on WindowOrWorkerGlobalScope mixin.

IE

Partial support 10

Opera

Full support 15

Safari

Full support 7

WebView Android

Full support Yes

Chrome Android

Full support 25

Firefox Android Full support 22


Full support 22


Full support 52

Notes'

Notes' indexedDB now defined on WindowOrWorkerGlobalScope mixin.

Opera Android

Full support 14

Safari iOS

Full support 8

Samsung Internet Android

Full support 2.0

Available in workers Chrome

Full support Yes

Edge

Full support ≤18

Firefox

Full support 37

IE

?

Opera

Full support Yes

Safari

?

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support 37

Opera Android

Full support Yes

Safari iOS

?

Samsung Internet Android

Full support Yes

Legend

Full support  
Full support
Partial support  
Partial support
Compatibility unknown  
Compatibility unknown
See implementation notes.'
See implementation notes.
Requires a vendor prefix or different name for use.'
Requires a vendor prefix or different name for use.


See also