title: How to stop older service workers?
body: <p>The image below shows that there are two workers installed - one active and the other not active (just installed). </p>
  
  <p><img src="https://i.stack.imgur.com/WhjXU.png" alt="two service workers running"></p>
  
  <ol>
  <li>Register a service worker</li>
  <li>Make changes to <code>service-worker.js</code> and reload the page.</li>
  <li>The logic is that Service Workers check binary diff and updates the versions of the workers. </li>
  </ol>
  
  <p>So a new service worker is spawned with a new version ID. But why does the old one keeps running ? and How do I close it ?</p>
  
  <p>The <code>sw.js</code> is here <a href="https://gist.github.com/boopathi/57b7e8b6d657d55bdc7d" rel="noreferrer">https://gist.github.com/boopathi/57b7e8b6d657d55bdc7d</a> </p>