Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript Library to Bridge IndexedDB and WebSQL

I'm curious if there is a library or a project out there to provide a generic interface to IndexedDB or to WebSQL, depending on user's browser's support. If they're using Chrome/Safari, use WebSQL, if they're using Firefox or Internet Explorer, use IndexedDB.

The poster of this question appears to have homegrown a solution, but did not provide any source code.

like image 947
Peder Rice Avatar asked May 24 '11 19:05

Peder Rice


People also ask

Is WebSQL deprecated?

Web SQL was deprecated and removed for third-party contexts in Chromium 97. [📍 We are here.] Web SQL access in insecure contexts is deprecated as of Chromium 105 at which time a warning message will be shown in the Chrome DevTools Issue panel.

Is IndexedDB deprecated?

Why to use indexeddb? The W3C has announced that the Web SQL database is a deprecated local storage specification so web developer should not use this technology any more. indexeddb is an alternative for web SQL data base and more effective than older technologies.

What is IndexedDB and WebSQL?

WebSQL Database is a relational database access system, whereas IndexedDB is an indexed table system. Don't start working with IndexedDB, relying on your assumptions from other types of databases. Instead, you should read the docs carefully.

Why is IndexedDB slow?

The reason is because when IndexedDB stores an object, it must first create a structured clone of that object, and the structured cloning process happens on the main thread. The larger the object, the longer the blocking time will be.


1 Answers

JasonCasden has shared a huge list of libraries/wrappers at his presentation In-browser storage and me. Here is the list:

lawnchair
persistence.js
persistJS
amplify.store
localStorageDB
https://github.com/axemclion/IndexedDB
realStorage
YUI3 CacheOffline
dojox.storage
DomSQL
Impel
ActiveJS ActiveRecord
JazzRecord
picnet.data.DataManager
ShinyCar
lscache
Kizzy
Artemia
microcache.js
Store.js
like image 156
Lee Chee Kiam Avatar answered Oct 03 '22 16:10

Lee Chee Kiam