Skip to content

Consider using workbox to strengthen ios offline support #64

@timmer9000

Description

@timmer9000

First, see how HAP works as-is on ios 7.2 which is supposed to contain PWA improvements for offline use.

If the app is meeting all our offline expectations, then delete this feature request.

If its not working well (app doesn't load after phone reboot, app restart etc..) when offline, then consider https://developer.chrome.com/docs/workbox which tells the browser to install all important app files in cache (vs relying on what was used recently to cache)

Workbox isn't designed for flutter exactly, to use it with flutter follow this tutorial: https://mohanrajmuthukumaran.hashnode.dev/flutter-pwa-workbox-caching

Some notes

  1. From now on you have to build the app using this command: flutter build web --pwa-strategy none --release
  2. Check to see if it impacts new user/first time user load times, the way I understand it is that it only does extra file loading if the user issues the install command
  3. It does not require any add'l flutter libraries, but in the index.html it will load workbox-sw.js from google so there must be some performance hit for that

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions