3 ms·
serviceworkers for caching content to be available offline (can cache most recent result from an api call so you don't even need to change anything on the front
by dbetteridge 9y ago
serviceworkers for caching content to be available offline (can cache most recent result from an api call so you don't even need to change anything on the frontend)
localstorage for offline state , if your serviceworker reports the app is offline then any changes of state go into localstorage and are queued for updating when the network is back online.
Any changes to the server side state can be diffed against the localstorage changes and you deal with it according your priorities. i.e is the user always right or does the server take priority?