title: Waiting for window load event to register service worker
body: <p>I stumbled upon this snippet in <a href="https://developers.google.com/web/tools/workbox/guides/get-started" rel="noreferrer">Google Workbox documentation</a>:</p>
  
  <pre><code>&lt;script&gt;
  // Check that service workers are registered
  if ('serviceWorker' in navigator) {
    // Use the window load event to keep the page load performant
    window.addEventListener('load', () =&gt; {
      navigator.serviceWorker.register('/sw.js');
    });
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>How exactly page load becomes less performant without window <code>load</code> event handler?</p>
  
  <p>Wouldn't it be generally preferable for service worker to hook up as early as possible, since one of main uses for it in PWA is caching? </p>