As pointed out by @rory_za, you need to use a service worker as it disables the offline function, push notifications, background content updates, content caching, and much more. To enable a service worker in your web application, you can add the following to your index.html :
<script> if ('serviceWorker' in navigator) { navigator.serviceWorker.register('service-worker.js') .then(() => console.log('service worker installed')) .catch(err => console.log('Error', err)); } </script>
If the browser supports service workers, you need to register your service-worker.js . This returns the promise that we can handle the way we want.
source share