incognito

Type String
Mandatory No
Manifest version 2 or higher
Example
json
"incognito": "spanning"
json
"incognito": "split"
json
"incognito": "not_allowed"

Use the incognito key to control how the extension works with private browsing windows.

Note: By default, extensions do not run in private browsing windows. Whether an extension can access private browsing windows is under user control. For details, see Extensions in Private Browsing. Your extension can check whether it can access private browsing windows using extension.isAllowedIncognitoAccess.

This is a string that can take any of these values:

  • "spanning" (the default): the extension sees events from private and non-private windows and tabs. Windows and tabs gets an incognito property in the Window or Tab that represents them. This property indicates whether or not the object is private:

    js
    browser.windows.getLastFocused().then((windowInfo) => {
      console.log(`Window is private: ${windowInfo.incognito}`);
    });
    
  • "split": the extension is split between private and non-private windows. There are effectively two copies of the extension running: one sees only non-private windows, the other sees only private windows. Each copy has isolated access to Web APIs (so, for example, localStorage is not shared). However, the WebExtension API storage.local is shared.

    Note: Firefox doesn't support "split" mode. Extensions that request this option in Firefox are installed using "not_allowed".

  • "not_allowed": private tabs and windows are invisible to the extension.

Example

json
"incognito": "spanning"
json
"incognito": "split"
json
"incognito": "not_allowed"

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
incognito
Chrome – Full support
Chrome 58 (Release date: 2017-04-19)
footnote Full support
Edge – Full support
Edge 18 (Release date: 2018-10-02)
footnote Full support
Firefox – Full support
Firefox 48 (Release date: 2016-08-02)
footnote Full support
Opera – Full support
Opera 45 (Release date: 2017-05-10)
footnote Full support
Safari – Partial support
Safari 14 – 16.6 (Release date: 2020-09-16)
footnote Partial support
footnote No user setting. Always operated in spanning mode.
Safari – Partial support
Safari 17 (Release date: 2023-09-18)
footnote Partial support
footnote Controlled by a user setting. When allowed, operates in spanning mode.
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – Partial support
Safari on iOS 15 – 16.6 (Release date: 2021-09-20)
footnote Partial support
footnote No user setting. Always operated in spanning mode.
Safari on iOS – Partial support
Safari on iOS 17 (Release date: 2023-09-18)
footnote Partial support
footnote Controlled by a user setting. When allowed, operates in spanning mode.
not_allowed
Chrome – Full support
Chrome 58 (Release date: 2017-04-19)
footnote Full support
Edge – Full support
Edge 17 (Release date: 2018-04-30)
footnote Full support
Firefox – Full support
Firefox 67 (Release date: 2019-05-21)
footnote Full support
Opera – Full support
Opera 45 (Release date: 2017-05-10)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 67 (Release date: 2019-05-21)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
spanning
Chrome – Full support
Chrome 72 (Release date: 2019-01-29)
footnote Full support
Edge – Full support
Edge 18 (Release date: 2018-10-02)
footnote Full support
Firefox – Full support
Firefox 48 (Release date: 2016-08-02)
footnote Full support
Opera – Full support
Opera 60 (Release date: 2019-04-09)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 48 (Release date: 2016-08-02)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
split
Chrome – Full support
Chrome 58 (Release date: 2017-04-19)
footnote Full support
Edge – Full support
Edge 17 (Release date: 2018-04-30)
footnote Full support
Firefox – Partial support
Firefox 127 (Release date: 2024-06-11)
footnote Partial support
footnote Split mode is not supported in Firefox. Extensions using this value are treated as requesting "incognito": "not_allowed".
footnote See bug 1380812
Opera – Full support
Opera 45 (Release date: 2017-05-10)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – Partial support
Firefox for Android 127 (Release date: 2024-06-11)
footnote Partial support
footnote Split mode is not supported in Firefox for Android. Extensions using this value are treated as requesting "incognito": "not_allowed".
footnote See bug 1380812
Safari on iOS – No support
Safari on iOS
footnote No support

Legend

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

Full support
Full support
Partial support
Partial support
No support
No support
Has more compatibility info.