title: Register service worker after hard refresh
body: <p>Whenever the web application with service worker is reloaded after hard refresh (<code>Ctrl + F5</code> for Chrome, for example), the service worker is unable to register afterwards.</p>
  
  <p>According to the documentation at <a href="https://w3c.github.io/ServiceWorker/#navigator-service-worker-controller" rel="nofollow noreferrer">W3C</a></p>
  
  <blockquote>
    <p>Note: navigator.serviceWorker.controller returns null if the request
    is a force refresh (shift+refresh). The ServiceWorker objects returned
    from this attribute getter that represent the same service worker are
    the same objects.</p>
  </blockquote>
  
  <p>So, the question is: is it really impossible to register service worker right after the <strong>hard refresh</strong> is performed? I am checking the existence of the service worker with the <code>navigator.serviceWorker.controller</code>. Please see the attached GIF which shows interaction with the <a href="https://googlechrome.github.io/samples/service-worker/basic/" rel="nofollow noreferrer">https://googlechrome.github.io/samples/service-worker/basic/</a> page</p>
  
  <p><a href="https://i.stack.imgur.com/nyXlz.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nyXlz.gif" alt="enter image description here"></a></p>