GoogleChromeLabs / sw-toolbox

[Deprecated] A collection of service worker tools for offlining runtime requests
https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
Apache License 2.0
3.61k stars 331 forks source link

Question: Cache parameter not showing offline page #254

Open oninross opened 7 years ago

oninross commented 7 years ago

I have this code below: screenshot_061517_112230_am

Correct me if I'm wrong here. The way I understand this is that if the browser hits any of the pages under /pages/, it will check the network first then cache it. Once offline, and if the page is cached, it will show the cached page. Otherwise, show the offline page.

If my assumption above is correct, I dont understand why the cache parameter hinders the toolbox from displaying the offline page. It always happens. The moment I remove the cache parameter, the offline page displays.

Any help would be nice :)