register service worker at relative scope
Co-Authored-By: Ian Reinhart Geiser <geiseri@geekcentral.pub>
This commit is contained in:
parent
a2ad3d4ff4
commit
46207cfe10
|
@ -29,7 +29,7 @@
|
|||
if ("serviceWorker" in navigator) {
|
||||
// Use the window load event to keep the page load performant
|
||||
window.addEventListener("load", () => {
|
||||
navigator.serviceWorker.register("/service-worker.js");
|
||||
navigator.serviceWorker.register('service-worker.js', {scope: './'});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue