GoogleChromeLabs / sw-precache

[Deprecated] A node module to generate service worker code that will precache specific resources so they work offline.
https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
Apache License 2.0
5.22k stars 388 forks source link

[Snippet] Generate an appCache file based on the sw-precache config #293

Closed whmountains closed 7 years ago

whmountains commented 7 years ago

https://gist.github.com/whmountains/f477620b1336c51d6ab8150207466d13

I just made this and wanted to share it. Maybe it will be useful for someone.

chialunwu commented 7 years ago

Why? It's a bit ironic for converting service worker to appCache... Are you trying to fallback if service worker is not supported by the browser?

jeffposnick commented 7 years ago

Thanks for the contribution, but support for the equivalent App Cache behavior is outside the scope of what we want to accomplish with this project.

silentsilas commented 7 years ago

Just wanted to say thanks for this snippet, @whmountains ! Apple devices don't support service workers (yet/ever), so I used this to fallback to AppCache to retain offline functionality.