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

Create Service Worker #308

Open
LukePrior opened this issue Nov 12, 2023 · 4 comments
Open

Create Service Worker #308

LukePrior opened this issue Nov 12, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@LukePrior
Copy link
Owner

LukePrior commented Nov 12, 2023

Will allow site to load quicker and work offline with stored data when installed as a PWA.

Caching Strategy:

  • Map tiles (keep for 30 days)
  • historical NBN info (keep indefinitely)
  • main/current NBN info (fetch every time or maybe keep for a few hrs max)
  • JavaScript files and others (30 days?)

https://stackoverflow.com/questions/46036897/best-practices-for-detecting-offline-state-in-a-service-worker
https://developer.chrome.com/docs/workbox/caching-strategies-overview/

@LukePrior LukePrior added the enhancement New feature or request label Nov 12, 2023
@LukePrior
Copy link
Owner Author

LukePrior commented Nov 12, 2023

@LukePrior
Copy link
Owner Author

Ok hopefully that will work ok, still needs an update to periodically purge caches if nearing storage limits

@lyricnz
Copy link
Contributor

lyricnz commented Nov 16, 2023

This might help with #309

@LukePrior
Copy link
Owner Author

#309 (comment)

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

No branches or pull requests

2 participants