Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service worker offline cache not working #143

Closed
johncalvinroberts opened this issue Apr 26, 2020 · 1 comment
Closed

Service worker offline cache not working #143

johncalvinroberts opened this issue Apr 26, 2020 · 1 comment

Comments

@johncalvinroberts
Copy link
Contributor

johncalvinroberts commented Apr 26, 2020

The service worker is either not properly caching assets, or not properly retrieving cached assets when offline.

Expected Behavior

When network is not available, the service worker should check the manifest-1.0.0 appcache for an asset, and serve it from the cache if a match is found.

Original task -- #22, implementation in #69

Current Behavior

When network is not available, the app does not load.

Possible Solution

Pretty sure I have the solution, it's just a missing return value on one of the SW hooks -- will open PR momentarily.

Edit: #143

Steps to Reproduce (for bugs)

  1. Either run the prod build on local env or visit the production app -> https://www.manifest.app/
  2. If in chrome, open devtools -> application tab -> cache storage -> manifest-1.0.0 -- confirm assets are being cached
  3. Either turn wifi off on your machine, or set throttling to offline in chrome dev tools
  4. Refresh the page
  5. Confirm -- page does not load

Context

I'm working on a similar lightweight utility app, and I checked out the Service Worker implementation on manifest as a reference. Super sick app by the way, huge inspiration!

@jonathontoon
Copy link
Owner

Merged. Thanks again for the fix @johncalvinroberts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants