Answer
Do PWAs work offline?
PWAs can work offline, but only for content their service worker has explicitly cached. Registering a service worker does not automatically make a site offline-capable — you decide what to cache (app shell, API responses, images) and what strategy to use (cache-first, network-first, stale-while-revalidate).
How offline actually works
The service worker intercepts every fetch and can respond from the Cache Storage API without going to the network. Anything not in the cache still fails when offline unless you fall back to an offline HTML page.
The three common patterns
App-shell caching (fast, works for static parts of the UI). Runtime caching (cache API responses as they are requested). Precaching (list of URLs cached at install — great for critical assets).
Storage limits
Cache Storage shares quota with IndexedDB — usually hundreds of MB on mobile, GB on desktop. Browsers evict least-recently-used origins under pressure.