- Clone the project
git clone https://github.com/rahuls360/testing-sw.git
- Install dependencies
yarn install
- Connect repo to your hosting. I used netlify-cli
npm install -g netlify-cli
- Login to netlify-cli
netlify login
- Deploy to Netlify
yarn run deploy:prod
- Make minor text changes
- Deploy new changes
yarn run deploy:prod
- Try to navigate between pages. You will see an 'Updates available' message, across all your open tabs.
- On clicking on 'Update'. The service worker are updated and all of your site's tabs are reloaded with new content.
- Profit ??
Building PWAs with React and Workbox
Checking for service worker updates in a single page app
Service worker JavaScript update frequency (every 24 hours?)
Activate updated service worker on refresh
Service Workers Break the Browser’s Refresh Button by Default; Here’s Why
⚡️Talk - Syncing Component State Across Tabs with Service Workers - Tyler Clark - React Conf 2018 react-conf-service-worker
Tyler Clark - React to Web Workers
and many more...