Results 81 - 100 of 161

IDBRequest.source

An object representing the source of the request, such as an IDBIndex, IDBObjectStore or IDBCursor.
API Database IDBRequest IndexedDB Property Reference source Source storage Storage

IDBTransaction

Note that as of Firefox 40, IndexedDB transactions have relaxed durability guarantees to increase performance (see bug 1112702.) Previously in a readwrite transaction IDBTransaction.oncomplete was fired only when all data was guaranteed to have been flushed to disk. In Firefox 40+ the complete event is fired after the OS has been told to write the data but potentially before that data has actually been flushed to disk. The complete event may thus be delivered quicker than before, however, there exists a small chance that the entire transaction will be lost if the OS crashes or there is a loss of system power before the data is flushed to disk. Since such catastrophic events are rare most consumers should not need to concern themselves further.
API Database IDBTransaction IndexedDB Interface MakeBrowserAgnostic Reference storage Storage

IDBTransaction.abort()

All pending IDBRequest objects created during this transaction have their IDBRequest.error attribute set to AbortError.
abort API Database IDBTransaction IndexedDB Method Reference storage Storage

IDBTransaction.error

A DOMError containing the relevant error. In Chrome 48 and later this property returns a DOMException because DOMError has been removed from the DOM standard. The exact error is one of serveral possibilities. It can be a reference to the same error as the request object that raised it, or a transaction failure (for example QuotaExceededError or UnknownError).
API Database Error IDBTransaction IndexedDB Property Reference Storage storage

IDBTransaction.mode

An IDBTransactionMode object defining the mode for isolating access to data in the current object stores:
API Database IDBTransaction IndexedDB mode Property Reference Storage storage

IDBTransaction.objectStore()

Every call to this method on the same transaction object, with the same name, returns the same IDBObjectStore instance. If this method is called on a different transaction object, a different IDBObjectStore instance is returned.
API Database IDBTransaction IndexedDB Method objectStore Reference storage Storage

IDBTransaction.onabort

In the following code snippet, we open a read/write transaction on our database and add some data to an object store. Note also the functions attached to transaction event handlers to report on the outcome of the transaction opening in the event of success or failure. Note the transaction.onabort = function(event) { }; block, reporting when the transaction has been aborted. For a full working example, see our To-do Notifications app (view example live.)
API Database IDBTransaction IndexedDB onabort Property Reference Storage storage

IDBTransaction.oncomplete

The oncomplete event handler of the IDBTransaction interface handles the complete event, fired when the transaction successfully completes.
API Database IDBTransaction IndexedDB oncomplete Property Reference Storage storage

IDBTransaction.onerror

In the following code snippet, we open a read/write transaction on our database and add some data to an object store. Note also the functions attached to transaction event handlers to report on the outcome of the transaction opening in the event of success or failure. Note the transaction.onerror = function(event) { }; block, making use of transaction.error to help in reporting what went wrong when the transaction was unsuccessful. For a full working example, see our To-do Notifications app (view example live.)
API Database IDBTransaction IndexedDB onerror Property Reference Storage storage

IDBVersionChangeEvent

The IDBVersionChangeEvent interface of the IndexedDB API indicates that the version of the database has changed, as the result of an IDBOpenDBRequest.onupgradeneeded event handler function.
API Database DOM IDBVersionChangeEvent IndexedDB Interface JavaScript Reference storage Storage

IDBVersionChangeEvent.newVersion

In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. These events are fired via the custom IDBVersionChangeEvent interface. For a full working example, see our To-do Notifications app (view example live.)
API Database IDBVersionChangeEvent IndexedDB newVersion Property Reference storage Storage

IDBVersionChangeEvent.oldVersion

In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. These events are fired via the custom IDBVersionChangeEvent interface. For a full working example, see our To-do Notifications app (view example live.)
API Database IDBVersionChangeEvent IndexedDB oldVersion Property Reference storage Storage

IndexedDB API

IndexedDB is a low-level API for client-side storage of significant amounts of structured data, including files/blobs. This API uses indexes to enable high performance searches of this data. While DOM Storage is useful for storing smaller amounts of data, it is less useful for storing larger amounts of structured data. IndexedDB provides a solution. This is the main landing page for MDN's IndexedDB coverage — here we provide links to the full API reference and usage guides, browser support details, and some explanation of key concepts.
Advanced API Database IndexedDB Landing Reference storage Storage

Browser storage limits and eviction criteria

There are a number of web technologies that store data of one kind or another on the client-side (i.e. on your local disk.) The process by which the browser works out how much space to allocate to web data storage and what to delete when that limit is reached is not simple, and differs between browsers. This article attempts to explain how this all works.
client-side Database eviction IndexedDB limit LRU storage Storage

Using IndexedDB

This tutorial walks you through using the asynchronous API of IndexedDB. If you are not familiar with IndexedDB, you should first read Basic Concepts About IndexedDB.
Advanced API Database Guide IndexedDB Storage storage Tutorial

Storage

The Storage interface of the Web Storage API provides access to the session storage or local storage for a particular domain, allowing you to for example add, modify or delete stored data items.
API data Interface Reference Référence Storage Web Storage