MDN wants to learn about developers like you: https://qsurvey.mozilla.com/s3/d6d7ff2e2f9c

Add-ons

privacy.websites

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

Default values for these properties tend to vary across browsers.

Properties

hyperlinkAuditingEnabled
A types.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.
protectedContentEnabled
A types.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.
referrersEnabled
A types.BrowserSetting object whose underlying value is a boolean. If enabled, the browser sends referer headers with your requests.
thirdPartyCookiesAllowed
A types.BrowserSetting object whose underlying value is a boolean. If false, the browser blocks third-party cookies.

Browser compatibility

ChromeEdgeFirefoxFirefox for AndroidOpera
Basic supportYesNo5454Yes
hyperlinkAuditingEnabledYesNo5454Yes
protectedContentEnabledYesNoNoNoYes
referrersEnabledYesNo5656Yes
thirdPartyCookiesAllowedYesNoNoNoYes

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,