New issue
Advanced search Search tips

Issue 705604 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

https://tests.peter.sh/notification-generator/ is no longer a PWA

Project Member Reported by pkotw...@chromium.org, Mar 27 2017

Issue description

https://tests.peter.sh/notification-generator/ is no longer a PWA

As a result of https://codereview.chromium.org/2751343002 a site needs to have a fetch handler in order to be considered a PWA
 
It would be great if tests.peter.sh/notification-generator/ kept on being a PWA. We use the site a lot for our testing

Adding this to the service worker should make the site a PWA again

self.addEventListener('fetch', event => {
  event.respondWith(
    caches.match(event.request, {ignoreSearch:true}).then(response => {
      return response || fetch(event.request);
    })
  );
});

Comment 2 by peter@chromium.org, Mar 27 2017

Since nothing's being cached offline, I guess it'd be OK to just have an empty `fetch` event handler? (Modulo load time delay, but sure.)

  self.addEventListener('fetch', event => {});
I just copied and pasted the service worker code used by airhorner.com (I don't completely understand what the code I copied and pasted does)

I suspect that an empty 'fetch' event handler should work. It looks like the InstallableManager code just checks for the presence of the fetch handler not that it does anything InstallableManager::OnDidCheckHasServiceWorker()

Comment 4 by peter@chromium.org, Mar 27 2017

Status: Fixed (was: Assigned)
https://github.com/beverloo/peter.sh/commit/7c8294a4169df1a7f5ecb80c3aff438bed421e69

Thanks for the bug report!

Sign in to add a comment