Service Worker Registration
Service Worker is registered in the head of the page
<meta http-equiv=”Expires” content=”-1” /> <script> if (‘serviceWorker’ in navigator) { navigator.serviceWorker.register(‘/sw.js’, {scope: ‘/’}).then(function(reg) { if (reg.installing) { console.warn(‘[SW] installing’); } else if (reg.waiting) { console. warn (‘[SW] installed’); } else if (reg.active) { console. warn (‘[SW] active’); } }).catch(function(error) { console.error(‘[SW] Registration failed’, error); }); } </script> <link rel=”StyleSheet” type=”Text/css” href=”Css/shared.css?v=48”>