<b>This week in caching: service workers, caching you control in JS</b>
The cache layer that lives in the browser but answers to your code:
— <i>Cache-first vs network-first vs stale-while-revalidate in Workbox</i> — picking a strategy per asset type instead of one global rule.
— <i>The update trap</i> — why users get stuck on an old app shell and the skipWaiting/clients.claim dance to fix it.
— <i>Cache versioning and cleanup</i> — naming caches v1/v2 and pruning old ones in the activate event so you don't leak storage.
— <i>Precaching vs runtime caching</i> — what belongs in the install manifest vs fetched on demand.
Credits to the Workbox docs and Jake Archibald's offline cookbook.
Bookmark: the update-trap writeup — the reason your PWA users 'don't see the new version.'
Cache Catch
@CacheCatch
<b>This week in caching: service workers, caching you control in JS</b>
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.