add comments and docs to sw.js,

add service worker ADR
This commit is contained in:
Arthur Lu
2022-12-01 08:37:49 +00:00
parent 1ed46b8ade
commit 7cb90e23c0
2 changed files with 37 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
# Use a network first cache second for service worker architecture
- Status: in consideration
- Deciders: Arthur Lu
- Date: 12 / 02 / 22
## Decision Drivers
- Need to balance the need for user ease of use and local first priority
- Users should expect to update their app easily when they have network, but may not be expected to know how to perform a hard refresh
- Local first priority means we should avoid unnecessary network activity when possible
## Considered Options
- Network first cache second
- Cache first network second
## Decision Outcome
Chosen Option: TBD