A web app manifest supplies metadata such as a name, start path, display preference, and icons for browsers that support installation. It does not create offline behavior or guarantee an install prompt. The start path must lead to a valid route with appropriate authentication handling; an installed icon should not open a blank client shell when the user is signed out. Keep ordinary web navigation and responsive layout fully usable without installation. Installation is a convenience layer over the site, not a separate permission or data-storage model.
Web App Manifest and Optional Installation
Working case
A reviewer installs the inspection portal on a managed laptop. Launching it opens the case queue route. If the session expired, the server returns a clear sign-in path rather than an empty screen. The manifest icon and short name identify the portal, but drafts remain governed by the same local storage policy as a browser tab. Another reviewer may never install it and should receive the same core workflow. Test the launch route after an update, when offline, and after sign-out before calling the install experience complete.
Implementation
{
"name": "AI Trove Inspection Portal",
"short_name": "Inspections",
"start_url": "/cases",
"display": "standalone",
"icons": [
{ "src": "/assets/inspection-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/assets/inspection-512.png", "sizes": "512x512", "type": "image/png" }
]
}Cost and boundaries
The manifest itself is small, but icons at several resolutions add transfer and storage. Installation support and prompt behavior vary by browser and environment, so code should not require a prompt event to proceed. A start route that loads a large script bundle still has that cost after installation. Cache only assets that help the launch experience and do not use the manifest as a substitute for performance work. Maintain icon files and routes across releases so existing installs keep opening correctly.
Common Mistakes
- Do not promise offline use merely because a manifest exists.
- Do not make installation mandatory for the core workflow.
- Do not point start_url at a route the server cannot open directly.
Connected lessons
Offline and Device Capabilities; Service Worker Offline Fallback; IndexedDB for Local Drafts; Offline Sync and Conflict Policy; Browser storage: save convenience data without storing credentials; Fetch requests: separate HTTP failure, transport failure, and cancellation; HTTP caching: validate a changed representation with an ETag.
Failure trace
The install prompt appears before the app has a useful offline path. A reviewer installs it, opens the case page without a connection, and gets a blank screen; the home shortcut also points to a private URL that requires a session. The manifest describes launch behavior and icons, but the underlying pages must work as ordinary web routes first. Choose a public start route and test it across sign-in states.
Verification
- Open the declared start URL in a fresh browser profile before installation.
- Inspect each icon dimension and verify it renders at small and large launcher sizes.
- Launch the installed app after sign-out and offline; confirm both states explain the next action.
Decision note
Installation is an optional entry point, not evidence that the application is offline-capable. Keep browser navigation and accessible page content complete for users who never install anything.
Apply and check
Build Project: offline inspection draft and photo intake; then check the boundary with Web Development: offline and delivery contracts quiz.
