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.
La propriété globale en lecture seule indexedDB
fournit un mécanisme qui permet aux applications d'accéder aux bases de données indexées de façon asynchrone.
Syntaxe
js
var IDBFactory = self.indexedDB;
Valeur de retour
Un objet IDBFactory
.
Exemples
js
var db;
function openDB() {
var DBOpenRequest = window.indexedDB.open("toDoList");
DBOpenRequest.onsuccess = function (e) {
db = DBOpenRequest.result;
};
}
Spécifications
Specification |
---|
Indexed Database API 3.0 # dom-windoworworkerglobalscope-indexeddb |
Compatibilité des navigateurs
Report problems with this compatibility data on GitHubdesktop | mobile | server | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Voir aussi
- Utiliser IndexedDB
- Initier une connexion :
IDBDatabase
- Utiliser les transactions :
IDBTransaction
- Définir un intervalle de clés :
IDBKeyRange
- Récupérer et modifier les données :
IDBObjectStore
- Utiliser les curseurs
IDBCursor
- Exemple de référence : To-do Notifications (exemple live).