Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javascript library for client side storage with server side sync [closed]

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

like image 490
msaspence Avatar asked Mar 14 '10 11:03

msaspence


People also ask

Can JavaScript store data on the client system and retrieve it?

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.

Does JavaScript work client-side or server-side?

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.

Which can be used to store client-side user data?

There are four main methods for storing large amounts of client-side data today: Web SQL, IndexedDB, Web Storage and Application Cache.

Which client-side storage APIs are accessible by service workers?

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.

What is the difference between client side storage and server side storage?

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.

What is client-side storage?

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.

Is there a library like localStorage that is asynchronous?

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.

What is browser-side storage?

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:


1 Answers

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.

like image 121
SomeCallMeTim Avatar answered Sep 18 '22 08:09

SomeCallMeTim