serviceWorker support?

serviceWorker support?

BY 01 Oct 2020 Web Application Development

Testing for (‘serviceWorker’ in navigator) appears to show support for them however when I try to register the service worker file I get the following error in the chrome developer/debugger:

Uncaught (in promise) DOMException: Failed to register a ServiceWorker: No URL is associated with the caller’s document.

Has anyone figured out how to register service workers? Am I going down a rabbit hole?

Help! Thanks.

Written by