Storing and Retrieving Data using IndexedDB

Enter a name date and time and click the plus (+) button.

This program shows you how to store and retrieve data on the client-side using IndexedDB.

IndexedDB is one kind of local storage supported by many browsers that any web app can use to store and retrieve data on the client. IndexedDB is an indexed database in which each record is identified by unique ID.

In brief, to save a record in an IndexedDB:

  • check for browser support
  • create or open a database
  • create or open an object store on the database
  • create a transaction on the object store
  • add the record to the database
  • handle transaction completed or error

Read this tutorial for more detail, or read the source.

See all samples.