HTML IndexedDB

Last Updated:

What is IndexedDB?

The IndexedDB is otherwise called as Indexed Database is a JavaScript API provided by web browsers for managing a NoSQL database of JSON objects.

The IndexedDB is a standard maintained by the World Wide Web Consortium (W3C).

How to view IndexedDB?

Follow the below steps to view your data stored in the IndexedDB:

  1. Go to Developer Tools or Press F12 or Press Ctrl + Shift + i.
  2. Switch to Application Tab on the top navigation bar.
  3. On the left side menu you will find the IndexedDB.

Note: If you couldn't find your recent changes in the IndexedDB, close and reopen the developer tools to see the changes.

Size Limitation

You can use up to 5MB on mobile, 50MB on desktop for free. However, the user can allow the limit to be removed by granting permission.

In the following example, we will create a table ('MyTableName') under the database ('MyDatabase').


HTML Online Editor
<!DOCTYPE html> <html> <body> <script> var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB; // Open (or create) the database var open ="MyDatabase", 1); open.onupgradeneeded = function() { var db = open.result; var store = db.createObjectStore("MyTableName", {keyPath: "id"}); var index = store.createIndex("NameIndex", ["name.last", "name.first"]); alert("Indexed Table Created Successfully"); }; </script> </body> </html>

Browser Support

Browsergoogle chromesafarifirefoxinternet Exploreredgeoperagoogle chromesafarifirefoxedgeoperaandroid webviewsamsung internet

Share this Page

Meet the Author