What is a PWA and standard Progressive Web App configuration guide
The Service Worker lifecycle, four caching strategies, manifest setup with Share Target and File Handlers, and the limits of PWAs on iOS Safari.

Progressive Web App (PWA) is a term coined by Alex Russell and Frances Berriman in 2015 for web applications that use modern browser features to run smoothly, reliably and be installed on a device like a real application.
A PWA does not depend on the App Store or Google Play. You update it by redeploying the website, and it still opens without a network thanks to a Service Worker.
The heart of a PWA: the Service Worker lifecycle
A Service Worker is a piece of JavaScript running in a background thread, separate from the browser's UI thread. It acts as a network proxy between the app and the internet: you intercept HTTP requests and decide where the response comes from.
A Service Worker has 4 main lifecycle states:
- ◆Installing: runs when the browser detects a new
sw.js. This is the time to create the first cache and store the static files (HTML, CSS, JS) of the app shell. - ◆Waiting: the new worker has finished installing but waits until every tab using the old version is closed, unless you call
skipWaiting. - ◆Activating: runs after installation or on a
skipWaitingsignal. Typically used to delete old caches. - ◆Active: controls every page within the worker's scope and handles fetch, push and sync events.
Four caching strategies
The caching strategy decides speed and data freshness. The four most common:
Cache First: answer from the cache when it has the resource, and go to the network only on a miss. Suits static assets such as CSS, JS and images, especially when file names carry a hash.
Stale-While-Revalidate: answer immediately with the cached copy while fetching a fresh one from the network to update the cache for next time. Suits content that may be slightly out of date, such as avatars or article lists.
Network First: prefer fresh data from the network and fall back to the cached copy only when offline. Suits dynamic APIs and news feeds.
Cache Only: read from the cache and never touch the network. Suits resources precached at install time, such as an offline notice page.
Manifest configuration and OS integrations
The manifest.json file tells the operating system what your app is. Besides basic properties such as name, theme_color and display: "standalone", it declares two deeper integrations:
Share Target (share_target): registers the PWA in the system share sheet. When a user shares an image, audio or a link from another app, your PWA shows up in the list of receivers. You must declare the right MIME types in accept so the operating system knows which files the PWA takes.
File Handlers (file_handlers): registers the PWA as an app that opens certain file extensions (such as .mp3 and .wav). Double-clicking a file in Finder or File Explorer opens it inside the PWA. This works only in desktop Chromium browsers (Chrome, Edge), not on Android.
{
"name": "AkiTao App",
"short_name": "AkiTao",
"start_url": "/?source=pwa",
"display": "standalone",
"theme_color": "#070b14",
"background_color": "#070b14",
"share_target": {
"action": "/share-target",
"method": "POST",
"enctype": "multipart/form-data",
"params": {
"title": "title",
"text": "text",
"files": [{ "name": "media", "accept": ["audio/mpeg", "audio/wav"] }]
}
},
"file_handlers": [
{
"action": "/open",
"accept": { "audio/mpeg": [".mp3"], "audio/wav": [".wav"] }
}
]
}iOS Safari: installable, with conditions
Since iOS and iPadOS 16.4, Safari reads the Web App Manifest for Home Screen web apps, provided display is standalone or fullscreen. Before 16.4, Safari did not read the manifest.
Safari on iOS still takes the Home Screen icon from the apple-touch-icon tag in <head>. Declare that tag with a 180x180 opaque-background file instead of relying only on icons in the manifest.
Testing and deployment
Use the Application tab in Chrome DevTools to inspect a PWA: check the Service Worker status and Cache Storage contents, simulate being offline and inspect the manifest.
Start with a proper mobile icon set. The AkiTao Favicon Generator produces the icons and a starter manifest.json; add share_target or file_handlers yourself when needed.