https://tests.peter.sh/notification-generator/ is no longer a PWA |
||
Issue descriptionhttps://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
,
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 => {});
,
Mar 27 2017
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()
,
Mar 27 2017
https://github.com/beverloo/peter.sh/commit/7c8294a4169df1a7f5ecb80c3aff438bed421e69 Thanks for the bug report! |
||
►
Sign in to add a comment |
||
Comment 1 by pkotw...@chromium.org
, Mar 27 2017It 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); }) ); });