Skip to content

Promote to production: cache ML models in the service worker - #87

Merged
slaveofcode merged 2 commits into
mainfrom
develop
Aug 1, 2026
Merged

Promote to production: cache ML models in the service worker#87
slaveofcode merged 2 commits into
mainfrom
develop

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

Adds a service-worker CacheFirst rule for HF/jsDelivr so Whisper weights don't re-download on refresh.

🤖 Generated with Claude Code

Kresna and others added 2 commits August 1, 2026 18:48
transformers.js fetches Whisper weights from huggingface.co (cross-origin) and
its own Cache Storage wasn't reliably persisting for users, so the model
re-downloaded on every refresh. Add a service-worker CacheFirst runtimeCaching
rule for the HF hosts (incl. cdn-lfs* / *.hf.co redirect CDNs) and cdn.jsdelivr
(ORT wasm) — our SW now serves them from cache across refreshes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix(pwa): cache ML model weights so they don't re-download on refresh
@slaveofcode
slaveofcode merged commit 5e554f4 into main Aug 1, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant