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

audit: App can load on offline/flaky connection (phase 2) #21

Closed
paulirish opened this issue Mar 17, 2016 · 2 comments
Closed

audit: App can load on offline/flaky connection (phase 2) #21

paulirish opened this issue Mar 17, 2016 · 2 comments
Assignees

Comments

@paulirish
Copy link
Member

Currently we: 1) get all SW registrations 2) filter to to see we have any in an "activated" state. This is good for right now, but it doesn't yet verify that offline caching provided via Service Worker
and it successfully page loads while offline. That'll be the next phase of this test.

Manual evaluation: Flip page offline via DevTools network throttling. Try it out

input:
  • all matched SW registrations
audit:

Something like this…

  1. flip network throttling to offline.
  2. maybe clear disk cache
  3. reload the page (or more cleanly: load about:blank and then navigate to the url)
  4. network domain can communicate if the page's network request was served via SW.
  5. verify its a 200, and page is "good"
when:
  • page loaded and in idle state
  • everything else is done?
@paulirish
Copy link
Member Author

We can also includes sort of check (from Kinlan's gist):

var allRequestsInCache = () => window.performance.getEntriesByType("resource").every(r => caches.match(new Request(r.name)));

@paulirish
Copy link
Member Author

@paullewis mentioned a simpler detect that seems good:

  1. flip network throttling to offline
  2. fetch the curent location clientside (fetch itself, yes), and see if it 200s

@paulirish paulirish modified the milestones: PWA MVP, Lighthouse MVP Mar 30, 2016
samccone added a commit that referenced this issue Apr 5, 2016
samccone added a commit that referenced this issue Apr 5, 2016
samccone added a commit that referenced this issue Apr 5, 2016
paullewis pushed a commit that referenced this issue Apr 5, 2016
Fixes #21. Deeply enjoyable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants