I'm registering my workbox service worker as follows:
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js');
});
}
</script>
The service worker is successfully registered but when I update the application the application is not updating until I clear all cache manually and restart chrome. How do I register a service worker in a way that it will self-update everytime I update the app?