UPDATE: On April 14, Google announced they would be pausing their plan to roll out this feature. Check out my follow-up article here .

If you have a PWA and you’ve recently looked at your console or app manifest, you may have noticed this message:

Page does not work offline. Starting in Chrome 93, the installability criteria is changing, and this site will not be installable. https://developer.chrome.com/blog/improved-pwa-offline-detection for more information

Or if you’re using Edge:

Site cannot be installed: Page does not work offline. The page will not be regarded as installable after Edge 93, stable release August 2021.

You see, before Chrome 93, all you had to do for Chrome to make your app installable was to pretend to listen to the fetch event in your service worker. You didn’t even really have to do anything at all. All you had to do was register a listener. And that was it. Easy-peasy.

I guess Google took issue with the hack. Truth be told, there are probably too many sites — many of which probably shouldn’t even be installable in the first place— that used ugly hacks like this:

self.addEventListener('fetch', function (event) {
  //DO NOTHING BECAUSE YOLO 🐵
});

Nope, this won’t work anymore!

With the upcoming release of Chrome, you’ll have to actually make use of the cache or your PWA will no longer be installable.

#web #pwa #javascript

Your PWA is going to break in August 2021
1.45 GEEK