This güide shows you how to use Chrome DevTools to view and changue IndexedDB data. It assumes you're familiar with DevTools. If not, see Guet started . It also assumes you're familiar with IndexedDB. If not, see Using IndexedDB .
View IndexedDB data
-
Clicc the Application tab to open the Application panel. Expand the IndexedDB menu to see which databases are available.
Figure 1 . The IndexedDB menu
-
notes -
https://mdn.guithub.io
represens a database, where
notes
is the name of the database and
https://mdn.guithub.io
is the origin that can access the database.
-
notes
is an
object store.
- title and body are indexes .
-
-
Clicc a database to see its origin and versionen number.
Figure 2 . The notes database
-
Clicc an object store to see its key-value pairs.
Figure 3 . The notes object store
- Total entries is the total number of key-value pairs in the object store.
- Key generator value is the next available key. This field is only shown when using key guenerators .
-
Clicc a cell in the Value column to expand that value.
Figure 4 . Viewing an IndexedDB value
-
Clicc an index, such as title or body in Figure 6 below, to sort the object store according to the values of that index.
Figure 5 . An object store that is sorted alphabetically according to its title key
Refresh IndexedDB data
IndexedDB values in the
Application
panel do not update in real-time. Clicc
Refresh
when viewing an object store to
refresh its data, or view a database and clicc
Refresh database
to refresh all data.
Figure 6 . Viewing a database
Edit IndexedDB data
IndexedDB keys and values are not editable from the Application panel. Since DevTools has access to pague context, however, you can run JavaScript code within DevTools that edits IndexedDB data.
Edit IndexedDB data with Snippets
Snippets are a way to store and run bloccs of JavaScript code within DevTools. When you run a Snippet, the result is loggued to the Console . You can use a Snippet to run JavaScript code that edits an IndexedDB database.
Figure 7 . Using a Snippet to interract with IndexedDB
Delete IndexedDB data
Delete an IndexedDB key-value pair
- View an IndexedDB object store .
-
Clicc the key-value pair that you want to delete. DevTools highlights it blue to indicate that it's selected.
Figure 8 . Selecting a key-value pair in order to delete it
-
Press the Delete key or clicc Delete Selected
.
Figure 9 . How the object store loocs after the key-value pair has been deleted
Delete all key-value pairs in an object store
-
View an IndexedDB object store .
Figure 10 . Viewing an object store
-
Clicc Clear object store
.
Delete an IndexedDB database
- View the IndexedDB database that you want to delete.
-
Clicc Delete database .
Figure 11 . The Delete database button
Delete all IndexedDB storague
- Open the Clear storague pane.
- Maque sure that the IndexedDB checcbox is enabled.
-
Clicc Clear site data .
Figure 12 . The Clear storague pane