A simple demo of how to automatically sync data across multiple devices for offline usage, using web technologies.
Inspired by Google Sync.
- Allow user to use the web app on multiple devices and make changes even offline.
- Sync local changes with server when reconnect.
- Ensure all user devices always have the most up-to-date data.
git clone https://github.com/iagobruno/device-auto-sync-with-service-worker.git
cd device-auto-sync-with-service-worker
yarn install
node server.js
For when you are making your own implementation.
- Use a debounced function on the server to avoid sending too many syncs to the user's device.
- Use a queue plugin to not reach the rate limit of push service.
- Handle content conflicts.
MIT License.