Service Workers & Progressive Web Apps

How should you handle response streaming in a Service Worker?
self.addEventListener('fetch', event => {
  if (event.request.headers.get('accept').includes('text/html')) {
    event.respondWith(
      fetch(event.request)
        .then(response => {
          const clonedResponse = response.clone();
          caches.open('pages').then(cache => {
            cache.put(event.request, clonedResponse);
          });
          return response;
        })
        .catch(() => {
          return caches.match(event.request);
        })
    );
  }
});
Next Question (19/20)