Polyfilling older browsers
Polyfills are libraries or fallbacks you can reference as needed to add support for modern features to browsers lacking support. Not all modern features can't be polyfilled, but many can. Some are not direct polyfills, but leveraging other APIs to create the desired experience.
The good news is that you can polyfill a service worker caching to a point. This can be done using IndexedDB. You will need an extra layer of JavaScript to manage the site's assets and API calls. We will touch on this technique in the advanced caching chapter.
In addition to using IndexedDB to cache assets, you can also use appCache as an offline and asset caching fallback.
Push notifications cannot be polyfilled, but you can utilize alternative ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access