PWA
Your website, wearing an app costume.
▶ the lesson · narrated sketch video · tap for sound
the intro
A Progressive Web App is a website with three additions: a manifest (name and icons), a service worker (offline + notifications), and HTTPS. Users install it from the browser straight to their home screen — no app store in the way.
fun fact ✦
A PWA can work fully offline — the service worker serves cached pages while the network is gone.
the docs
the deep dive
the ideas behind the video — concepts, diagrams, a walkthrough and the traps to avoid
Every tap in a normal web app is a small prayer to the network. A service worker is a script the browser keeps running that stands between your app and that network, so pages, styles, and data can be answered from the device itself. The manifest is just the business card that lets the browser put an icon on the home screen and open you fullscreen. Install without a store, update without a review queue.
a proxy that answers without the network
key terms
manifest
A JSON file describing your app: name, icons, colors, start URL, and how it should open.
"display": "standalone"service worker
A background script that can intercept every network request and answer it from cache.
navigator.serviceWorker.registerapp shell
The minimal frame of the UI — layout, fonts, code — cached so the app opens instantly, offline or not.
HTML + CSS + JS skeletonstale-while-revalidate
Serve the cached copy immediately, refresh it in the background for next time.
fast today, fresh tomorrowhow it works
- 1Serve over HTTPS
The browser only grants service workers on secure origins. Localhost counts for development.
- 2Add the manifest
Name, icons at 192 and 512 pixels, a start URL, and display: standalone so it opens without browser chrome.
- 3Register the worker
One line of JS asks the browser to install your service worker. It then lives between app and network.
- 4Cache the app shell
On install, prefetch the HTML, CSS, and JS frame so the app opens even with zero connectivity.
- 5Design the offline story
Decide what each screen shows without fresh data. Network-first for data, a cached fallback page for the rest.
the code, explained
the heart of a PWA: every request passes through your worker
side by side
PWA
- install straight from the site
- no review gate, updates are instant
- one codebase runs everywhere
- iOS holds back some APIs
store app
- discovered via store search
- full native API surface
- each update passes review
- users trust the store badge
A service worker is stubborn: deploy a new version and users may keep seeing the old cached app until the updated worker finishes installing and takes control. Bump your cache names, call clients.claim(), and test updates on a real deployed site — localhost hides this.
quick answers
Do PWAs work on iPhone?
Yes, with limits: Safari supports Add to Home Screen and, since iOS 16.4, push notifications for installed apps. There is no Chrome-style automatic install prompt.
Is a responsive site already a PWA?
No. Until you add HTTPS, a manifest, and a service worker, it is just a website. The three ingredients are the difference.
How much can I cache?
Chrome lets Cache Storage and IndexedDB grow with free disk space — easily hundreds of megabytes. Safari is stricter and may clear unused data, so treat offline data as expendable.
quick hits about PWA
short answers · interviews, tips, trivia & hidden gems