Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What data types does IndexedDb support?

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

like image 474
tribute2ro Avatar asked Mar 20 '14 22:03

tribute2ro


People also ask

What is IndexedDB and how does it work?

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.

How many object stores should an IndexedDB database have?

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.

What is IndexedDB 3 partial support?

3 Partial support refers to a bug in version 14.1.1 that causes indexedDB to never load when the browser is initially opened.

Is there a synchronous version of the IndexedDB API?

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.


1 Answers

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.

like image 69
Kyaw Tun Avatar answered Oct 01 '22 20:10

Kyaw Tun