prefer_related_applications

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The prefer_related_applications manifest member is used to provide a hint to browsers whether to prefer installing native applications specified in the related_applications manifest member over your web application.

Syntax

json
/* Boolean values */
"prefer_related_applications": true
"prefer_related_applications": false

Values

A boolean value:

  • If set to true, browsers may prompt users to install one of the applications listed in related_applications instead of your web app.
  • If set to false or omitted, browsers will prefer to install your web app over related native applications.

    Note: For Chromium-based browsers, prefer_related_applications should be set to false or omitted to make your web app installable.

Examples

Specifying preference for installing your web app

Consider a scenario where you have both a web app and native apps for your product available on Google Play Store and Windows Store. If you want to offer related native apps as options but prefer users to install your web app, you can set it up in your manifest file as shown below. Browsers will promote your web app for installation. The native apps will still be available as alternatives.

json
{
  "prefer_related_applications": false,
  "related_applications": [
    {
      "platform": "play",
      "id": "com.example.hiking-app"
    },
    {
      "platform": "windows",
      "url": "https://apps.microsoft.com/detail/9nqx6sv74srz"
    }
  ]
}

To encourage users to install your native Android hiking app from Google Play Store in preference to the web app, you can configure your web app's manifest file as shown below.

json
{
  "prefer_related_applications": true,
  "related_applications": [
    {
      "platform": "play",
      "id": "com.example.hiking-app"
    }
  ]
}

Specifications

Specification
Manifest Incubations
# prefer_related_applications-member

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
prefer_related_applications
Experimental
Chrome – No support
Chrome
footnote
footnote prefer_related_applications must be false or not present for a web app to be installable.
Edge – Full support
Edge 17 (Release date: 2018-04-30)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – No support
Opera
footnote
footnote prefer_related_applications must be false or not present for a web app to be installable.
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 44 (Release date: 2015-07-29)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote The property parses, but has no effect.
Opera Android – Full support
Opera Android 32 (Release date: 2015-09-23)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 4 (Release date: 2016-03-11)
footnote Full support
WebView Android – Full support
WebView Android 44 (Release date: 2015-07-29)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.

See also