Gagan
Gagan

Reputation: 318

Storing and Managing offline data in Web apps

I am creating a web app that allows user to upload some data to the web server. But I want this app to work offline as well , so if network is not availabe it should store the data in local storage and it should push the data to the server when network is available. Is there a JS library that could simplify this?

Upvotes: 0

Views: 618

Answers (2)

Sunny
Sunny

Reputation: 1456

JsStore is a client-side javascript library for performing database operations inside the browser using indexeddb. You can check that.

Upvotes: 0

Jeff Posnick
Jeff Posnick

Reputation: 56034

The feature you're looking for is the Background Sync API.

You could use workbox-background-sync to make usage easier, including a built-in polyfill for the behavior on browsers that don't support the Background Sync API.

Upvotes: 1

Related Questions