PWA Runtime Model

A PWA is still a website. Installation adds operating-system launch surfaces, but the runtime is the browser engine plus origin-scoped storage and service worker control.

What to notice:

  • The manifest describes app identity and install presentation. It does not execute code.
  • The service worker sits between controlled pages and network requests. It can also receive push and sync events.
  • Cache Storage stores request/response resources. IndexedDB stores app data.
  • Installed windows and browser tabs are both web clients. Scope and origin still matter.

Runtime Boundaries

BoundaryPractical meaning
OriginStorage, service worker scope, permissions, and caches are origin-bound
ScopeA service worker controls pages under its registration scope
Secure contextProduction PWA capabilities require HTTPS
Browser engineInstalled PWAs still inherit browser support and limitations
OS surfaceLaunch icon, app switcher, file handling, share targets, and notifications are platform-specific

Gotcha: Do not keep critical state in service worker globals. Browsers can terminate and restart service workers. Persist state in IndexedDB or send it to the server.