Uniswap / Uniswap/interface

ServiceWorker: locales should only be cached if/when requested

Open
#3,030 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.