I'm looking for a javascript library that will let me store data in a client side database and in the back ground automatically sync the database back to the server's database
preferable something that supports a variaty of engines in the same way jStore for jQuery does
Looking around I can find anything
It consists of JavaScript APIs that allow you to store data on the client (i.e. on the user's machine) and then retrieve it when needed.
JavaScript. JavaScript is a client-side script, meaning the browser processes the code instead of the web server. Client-side scripts are commonly used when we want to validate data before sending it to the web server, adjusting the interface in response to user feedback, and for implementing other advanced features.
There are four main methods for storing large amounts of client-side data today: Web SQL, IndexedDB, Web Storage and Application Cache.
Cache API The Cache API provides storage for HTTP request and response object pairs. You can create any number of named caches for storing any number of network data items. The API is typically used in service workers to cache network responses for progressive web apps.
As the name suggests, client-side storage allows the user to store data on the client (i.e. user's browser). Conversely, server-side storage will store data on the server (i.e. an external database). For more infomation on the difference between 'client' and 'server', check out my article on Introduction to Back-End Programming.
Client-side storage works on similar principles, but has different uses. It consists of JavaScript APIs that allow you to store data on the client (i.e. on the user's machine) and then retrieve it when needed.
This library, built by Mozilla, gives you a simple localStorage-like API, but uses asynchronous storage via IndexedDB or WebSQL. The API is exactly the same as localStorage ( getItem(), setItem(), etc), except its API is asynchronous and the syntax requires callbacks to be used.
Storing and manipulating data in the browser — also known as client-side storage — is useful when it’s not necessary or practical to send it to the web server. Situations for storing and manipulating data in the browser include:
Just stumbled across this question; for posterity, CouchDB and CouchBase are designed for this:
http://couchdb.apache.org/
The JavaScript client:
https://pouchdb.com/
And CouchBase:
https://www.couchbase.com/
Finally, CouchBase Lite/Mobile:
https://www.couchbase.com/products/lite
The latter gets you native CouchDB/CouchBase synchronization.
In all cases you just access the local database and it can synchronize if and when you connect to the internet.
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