Feature Library

Installable phone app shell

<0.01 CPU ms
A still of the Installable phone app shell demo
Still
The live demo starts when it’s in view.Send requests online and off, deploy a new build · type in the phone to raise its keyboard · install it from the tip or the Share menu

What turns a web app into something on the home screen.

What it costs a frame

<0.01 ms
GPU
not used
CPU, median
<0.01 ms
CPU, 95th pct
<0.01 ms
Draw calls
0
Weight
Light

Measured 11 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured with the demo exercising itself: every request sent through the rehearsed worker about twice a second (a new build deployed every fourth round), and the phone’s keyboard opening and closing once a second with the app resized to it. No service worker is registered. At rest nothing runs. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed<0.01<0.01
apple · Apple A19 Proin a browser tab · 16 November 2026not timed<0.01<0.01
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed<0.01<0.01

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. A web app that opens with no signal
  2. Installing a web app on iPhone and Android
  3. A bottom bar that stays above the iOS keyboard
  4. App icons and a manifest without a design tool
  5. Cache rules for a service worker
  6. Keeping the screen on while a list is in a hand

Pitfalls, in brief

  1. Never register the worker in development (pass enabled: import.meta.env.PROD): a dev server’s files change under it, and a stale worker survives every reload until you unregister it in DevTools (Application → Service workers).
  2. A service worker controls only URLs under its own folder: serve sw.js beside index.html (the plugin does), not from /assets/.
  3. The worker must be a classic script, so its entry must not share modules with the app: if the app imports sw-policy.ts too, the bundler splits a shared chunk and sw.js gains an import.
  4. Serve sw.js with Cache-Control: no-cache (most hosts do for files without a hash).
  5. precache is all or nothing: if one file 404s the new worker isn’t installed and the old one stays in charge.
7 more in brief
  1. A file without a hash in its name (an icon, the manifest) is fetched fresh when online and kept for offline.
  2. iOS reads apple-mobile-web-app-status-bar-style once, at launch.
  3. An iPhone never fires beforeinstallprompt, and Safari has no install button: the tip shows the Share steps.
  4. fitToKeyboard needs the viewport meta with interactive-widget=resizes-content for Android, and an app sized with height: var(--vvh, 100dvh) on its screen (not the body, which iOS still scrolls).
  5. A wake lock is dropped whenever the tab is hidden and is asked for again when it returns; the browser may refuse it (low battery, a power saver, not visible).
  6. make-icons.mjs loads the .ts files directly, which needs Node 22.18 or later (type stripping).
  7. Hide the tip only when the person asks: a tip that comes back after a reload is the most common complaint.
12 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From My other apps. Fully custom code.

WAI-ARIA Authoring Practices Guide (W3C): the tabs and radio group patterns, and the switch, in the demo; the tip’s buttons and focus kept when it closes. Written here from scratch.

Web App Manifest and Service Workers (W3C): the manifest members, maskable icons and their safe zone (a circle of 40% of the icon), and the install, activate and fetch lifecycle the worker follows

PNG (ISO/IEC 15948) and zlib (RFC 1950): the file format the icon writer emits: chunks with CRC-32, stored or deflated image data with an Adler-32 check. Written from the specifications.

PWAprogressive web appservice workerofflinecachenetwork firstcache firstmanifestinstalladd to home screenbeforeinstallpromptiOSAndroidiconsPNGmaskablevisualViewportkeyboardsafe areatheme-colorstatus barwake lockVite plugintouch

Near it in the frame