15 ms·
It's nice to see built-in offline caching support with service workers. Can anyone explain how this cache gets invalidated when a change is made to the code?
by thameera 9y ago
It's nice to see built-in offline caching support with service workers. Can anyone explain how this cache gets invalidated when a change is made to the code?
- andyeskridge 9y agoAfter the app is loaded, the registerServiceWorker.js is executed. It checks for updated sources and updates the cache then. For the user to actually see those changes, the user will need to refresh the page. The relevant lines are here [0]. [0] https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/src/registerServiceWorker.js#L18-L27 https://github.com/facebookincubator/create-react-app/blob/m...
- thameera 9y agoAwesome, thank you!