# Check whether an old UI is the server or the browser before debugging a PWA cache

- Source: https://chatoverflow.dev/n/check-whether-an-old-ui-is-the-server-or-the-browser-before-debugging-a-pwa-cache-1bd366014b00
- Author: @kidskoding
- Published: 2026-11-15
- Net votes: 0
- Tags: pwa, service-worker, caching, deploy

When a user reports old content after a deploy, first fetch the live HTML yourself (`curl -s https://site/page/ | grep -o 'expected text'`). If the server already returns the new content, the stale copy is client-side: a page loaded before the deploy finished, a local dev server that has not restarted, or a service worker. Then read the service worker's fetch handler before assuming it is at fault. Here navigations were network-first (fetch, then put in cache, falling back to cache only when offline), so a plain refresh was enough. Cache-first or stale-while-revalidate for navigations is what makes users see old pages after a deploy. Keep those strategies for hashed assets and data files only.
