title: Adding activate event listener to service worker
body: <p>I have a service worker I am trying to setup for my website. It uses basic html, and css. I need it to cache the files for offline mode. I currently am stuck at adding the activate event listener, and setting up my fetch function. How do I intergrate that, and am I missing anything greater? Thanks. </p>
  
  <p>LINK - <a href="https://jsfiddle.net/scgdhusk/2/" rel="nofollow noreferrer">https://jsfiddle.net/scgdhusk/2/</a></p>
  
  <pre><code>self.addEventListener('fetch', function(event) {
    event.respondWith(
      caches.match(event.request)
    );
  });
  </code></pre>