title: Angular5 Service Worker update(SWUpdate) not detecting on firefox. Working on chrome
body: <p>I am using <code>Angular5</code> and <code>angular service worker</code>.</p>
  
  <p>I <code>cached</code> some data and some assets and everything is working fine as expected and even deployed the code.</p>
  
  <p>Now, if I update some code and deploy again, the <strong><code>service worker</code> doesnot get updated.</strong></p>
  
  <p>So, I had gone through <a href="https://angular.io/guide/service-worker-communications" rel="noreferrer">Angular service worker</a> link and I Implemened <code>SwUpdate service</code>.</p>
  
  <p>Here is my code:</p>
  
  <p><strong>I created a service and called it in App Component</strong></p>
  
  <pre><code>import { Injectable, NgZone } from '@angular/core';
  import { interval } from 'rxjs/observable/interval';
  import { SwUpdate } from '@angular/service-worker';
  import { Observable } from 'rxjs/Rx';
  
  
  @Injectable()
  export class ServiceWorkerService {
  
    constructor(updates: SwUpdate, ngZone: NgZone) {
      console.log('Servicee worker update called');
      updates.available.subscribe(event =&gt; {
        console.log('current version is', event.current);
        console.log('available version is', event.available);
        updates.activateUpdate().then(() =&gt; document.location.reload());
      });
      updates.activated.subscribe(event =&gt; {
        console.log('old version was', event.previous);
        console.log('new version is', event.current);
      });
      ngZone.runOutsideAngular(() =&gt; {
        interval(6000).subscribe(() =&gt; {
          console.log('Inside Interval')
          ngZone.run(() =&gt; updates.checkForUpdate());
        });
      });
    }
  }
  </code></pre>
  
  <p>What the above code does:</p>
  
  <ul>
  <li>Whenever a new code is deployed, the old serviceworker detects it.</li>
  <li>Then it <code>subscribes</code> to <code>updates.available</code> event.</li>
  <li>We listen to that event and er reload the page.</li>
  </ul>
  
  <p><strong>Issue:</strong></p>
  
  <blockquote>
    <p>Now, the issue is, it is working perfectly on chrome. <strong>But not in 
    firefox</strong>. In firefox, the code is not comming inside
    <code>updates.available.subscribe</code></p>
  </blockquote>