privacy.websites

The privacy.websites property contains privacy-related settings controlling the way to browser interacts with websites. Each property is a privacy.BrowserSetting object.

Default values for these properties tend to vary across browsers.

Properties

thirdPartyCookiesAllowed
A privacy.BrowserSetting object whose underlying value is a boolean. If false, the browser blocks third-party cookies.
hyperlinkAuditingEnabled
A privacy.BrowserSetting object whose underlying value is a boolean. If true, the browser sends auditing pings when a website uses the ping attribute to request them.
referrersEnabled
A privacy.BrowserSetting object whose underlying value is a boolean. If enabled, the browser sends referer headers with your requests.
protectedContentEnabled
A privacy.BrowserSetting object whose underlying value is a boolean. Available on Windows only. If true, the browser provides a unique ID to plugins in order to run protected content.

Browser compatibility

Chrome Edge Firefox Firefox for Android Opera
Basic support Yes No 54 54 Yes

Compatibility notes

Firefox

  • 'thirdPartyCookiesAllowed', 'referrersEnabled', and 'protectedContentEnabled' are not supported.

Firefox for Android

  • 'thirdPartyCookiesAllowed', 'referrersEnabled', and 'protectedContentEnabled' are not supported.

Examples

Set the hyperlinkAuditingEnabled property, for private browsing windows.

function onSet(result) {
  if (result) {
    console.log("success");
  } else {
    console.log("failure");
  }
}

browser.browserAction.onClicked.addListener(() => {

  var getting = browser.privacy.websites.hyperlinkAuditingEnabled.get({});
  getting.then((got) => {
    console.log(got.value);
    if ((got.levelOfControl === "controlled_by_this_extension") ||
        (got.levelOfControl === "controllable_by_this_extension")) {
      var setting = browser.privacy.websites.hyperlinkAuditingEnabled.set({
        value: true
      });
      setting.then(onSet);
    } else {
      console.log("Not able to set webRTCIPHandlingPolicy");
    }
  });

});

Acknowledgements

This API is based on Chromium's chrome.privacy API. This documentation is derived from privacy.json in the Chromium code.

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Document Tags and Contributors

 Contributors to this page: wbamberg
 Last updated by: wbamberg,