title: Service worker Install event vs Activate event
body: <p>This is regarding the serviceworker API that is used in Progressive Web App.
  Can anyone help me to understand the difference between Service worker <strong><em>install event and activate event?</em></strong> </p>
  
  <p>Following are my understanding,</p>
  
  <ol>
  <li>Install event is the first event that occurs after registering the service worker.</li>
  <li>Install event only happens once - I'm not sure about this, i can see this event runs when page gets refreshed. So I'm confused with that statement.</li>
  <li>After the install event - activate event triggers.</li>
  <li>Activate event triggers every time when page reloads.</li>
  </ol>
  
  <p>Apart from above statement, my question is what exactly the difference between two events, they both run one after another, if so why we need two events ?</p>
  
  <p>Update:
    Sharing the resource which might help. I'm reading this.
       <a href="https://developers.google.com/web/fundamentals/instant-and-offline/service-worker/lifecycle" rel="nofollow noreferrer">https://developers.google.com/web/fundamentals/instant-and-offline/service-worker/lifecycle</a></p>
  
  <p>Thanks for all the response.</p>