ServiceWorker: locales should only be cached if/when requested
Open
Nobody has claimed this yet.
performance
serviceworker
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Currently, the SW only marks the app as cached once all locales have loaded. Locales are large and numerous, so this actually delays loading time.
Instead, locales should not be included in the proactive SW load, and only be loaded if/when the user translates the page.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the ServiceWorker entry points for proactive caching and locale loading; trace how the app marks itself cached and how translation requests load locales. Done means the proactive load no longer waits for every locale, while locales are fetched when the user translates the page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100