I have searched, but can't seem to find anything about the data types that IndexedDB supports. I know that it supports basic Javascript objects, but what if I want to store an instance of an object or a blob of data? Does IndexedDB support anything more than simple objects or does it have data types to assist in doing creative things?
Thank you
As browsers become increasingly more capable, so do the options to store and manipulate application data. This article introduces you to the in-browser document database known as IndexedDB. With IndexedDB you can create, read, update, and delete large sets of records in much the same way you are accustomed to doing with server-side databases.
For example, for a site persisting user profiles and notes, you can imagine a people object store containing person objects, and a notes object store. A well structured IndexedDB database should have one object store for each type of data that needs to be persisted.
3 Partial support refers to a bug in version 14.1.1 that causes indexedDB to never load when the browser is initially opened.
At time of going to print, there are no browsers that implement the synchronous form of the IndexedDB API. Make sure to keep the code that normalizes vendor-specific instances of indexedDB, IDBTransaction, and IDBKeyRange outside any function scope that has use strict applied.
IndexedDB use Structured Cloning Algorithm to serialize the data. Basically it can save all javascript data types in plain object, in nested or in circular reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With