Glossary
Definition
beforeinstallprompt
Short definition
beforeinstallprompt is a window event Chromium browsers fire when a site meets the PWA install criteria. Capturing the event and calling prompt() later lets you show the install dialog at a moment of your choosing instead of at page load.
Reviewed July 8, 2026
Firefox and Safari do not fire beforeinstallprompt — iOS install still requires a manual share-sheet guide.
The event can only be prompted in response to a user gesture (click, tap). Calling prompt() from a timer or on load throws.
After prompt() resolves, the deferred event is single-use. Store the userChoice outcome and hide any custom install UI accordingly.
Related terms
Service worker
A service worker is a JavaScript file the browser runs in the background, separate from the page. It intercepts network requests, caches responses so the site works offline, and receives web-push events so the site can notify the user when it is closed.
Web App Manifest
A Web App Manifest is a JSON file (usually manifest.webmanifest) that declares your app's name, icons, start URL, theme colour and display mode. The browser reads it to render the install prompt and the home-screen icon.
Standalone display mode
Standalone is a value of the display field in a Web App Manifest. It tells the browser to launch the PWA in its own window with no address bar or tabs, so it looks and behaves like a native app. It is the most common display mode for installable PWAs.