display-mode
How the page is shown: browser tab, standalone, fullscreen, PWA.
In one line
Can tell whether it is open in a browser tab, a home screen app or fullscreen
How the page is shown: browser tab, standalone, fullscreen, PWA.
Shows the app was installed as a PWA and whether the person runs it in a window. Useful for install analytics.
What it can and can't do
What the user does: Nothing. It happens when the page loads or the window changes.
It can
- Check which display mode it is running in
- Hide install buttons when it is already an app
- Change its layout to fit app or tab
It cannot
- See which other apps you have installed
- Tell whether you also installed it on another device
- Install itself without you choosing to
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 42 | 2015-04-14 | None |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Supported | 47 | 2016-06-07 | None |
| Safari | Supported | 13 | 2019-09-19 | None |
| Safari on iPhone | Supported | 12.2 | 2019-03-25 | None |
| Chrome on Android | Supported | 42 | 2015-04-15 | None |
| Samsung Internet | Supported | 4.0 | 2016-03-11 | None |
How a site asks for it
| API | matchMedia('(display-mode: standalone)') |
| Browser compat keys | css.at-rules.media.display-mode |
| How access is granted | none |
| What the user sees | None |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | read fresh on every page load; nothing stored |
| How to take it back | none needed (no grant) |
| Inside an iframe | Readable from cross-origin iframes too (same values) |
Typical flow
- Page script reads the value
- No prompt is shown
Data you get
Shape: object
How often: static per session
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
display-mode | enum | None | browser, standalone, minimal-ui, fullscreen, window-controls-overlay, picture-in-picture | Not listed |
The story
What it is
Tells a page whether it runs in a normal tab, as an installed app window, or full screen.
For you
You never see the check. But an app you installed from your browser may hide the address bar and show its own simple menu.
For makers
Makers change the layout for installed mode, hide the install prompt, and measure how many people install. Installed users usually come back more often, so it is a key business signal.
Where you see it
| Type | Example | Apps |
|---|---|---|
| productivity | A to do app hides its 'Install' banner and shows a bottom tab bar once it runs as an installed app. | None named |
| social | A social site counts how many daily users come from the installed version to see whether installs lift return visits. | None named |
| games | A browser game offers fullscreen play and landscape layout when launched from the home screen. | None named |
| media | A music or video site shows its own back button because the browser one is gone. | None named |
| shopping | A store gives installed users a faster checkout and push notification offer. | None named |
| analytics | A team tags installed sessions in analytics to compare them against tab visits. | None named |
Risks
- Reveals app install status
- Little else
What the platform says
- web.dev: Progressive Web Apps. Google pitches installable web apps that open in their own window like a native app.
- MDN: display-mode media feature. Documents how a page can detect if it runs in a browser tab or as an installed app.
Good uses and abuse
Legitimate uses
- Respect OS theme and accessibility needs
- Adapt layout
Known abuse
- Infer disability or setting for fingerprinting
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 3 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 0.5 | Rough identifying entropy, when known |
Related capabilities
Related
- Accessibility settings inferred. Can guess you may use accessibility settings by combining several browser signals
Sources
How well checked: Based on official documentation.