vigator.serviceWorker.register(
        &#39;serviceWorker.js&#39;);
      console.log(registration);
      await navigator.serviceWorker.ready;
      console.log(&quot;service worker ready&quot;);
      await sleepMs(100);
      await fetch(`serviceworker-write?secret=${key}`);
    }

read: async () =&gt; {
      let registration = await navigator.serviceWorker.register(
        &#39;serviceWorker.js&#39;);
      console.log(registration);
      await navigator.serviceWorker.ready;
      console.log(&quot;