jackkoppa / cityaq

Angular PWA to compare simple air quality data for different cities, using the OpenAQ API
http://cityaq.com
7 stars 5 forks source link

Offline Service Workers behaving inconsistently #8

Open jackkoppa opened 6 years ago

jackkoppa commented 6 years ago

This is a:

[x] Bug Report
[ ] Feature Request
[ ] Suggestion

Expected Behavior

When viewing a list of cities (e.g. Shanghai, Mumbai), and then losing internet connection, those cities should still be available on the next refresh. As well as the full list of city names.

Actual Behavior

It looks like, once again, this offline behavior is inconsistent. Often, on page refresh, neither the previously loaded cities nor the full list of city names is loading. This is likely due to a recent upgrade of the @angular/cli, with the root cause remaining Angular Issue #21636; my working solution had been this build script

Steps to Reproduce the Problem

  1. Load the app
  2. Search for one or two cities (e.g. Shanghai, Mumbai)
  3. Verify the city cards loaded correctly
  4. On the machine or in Chrome Dev Tools, go offline
  5. Refresh the page

Specifications