Skip to content

Latest commit

 

History

History
332 lines (211 loc) · 10.4 KB

File metadata and controls

332 lines (211 loc) · 10.4 KB

≡ privacy.websites API

privacy.websites API

Hint

The privacy.websites API is inherited from Firefox, and its primary documentation is maintained by Mozilla at MDN. Thunderbird implements only the subset of functions, events, and types listed here. The MDN pages may provide further details and examples, but they may also reference features that are not supported in Thunderbird.

Use the browser.privacy API to control usage of the features in the browser that can affect a user's privacy.

.. rst-class:: api-main-section

Permissions

The following permissions influence the behavior of the API. Depending on which permissions are requested, additional methods might be available, or certain data may be included in responses.

Hint

Request permissions only when needed. Unnecessary requests may result in rejection during ATN review.

.. api-member::
   :name: :permission:`privacy`
   :refid: privacy-websites-permission-privacy
   :refname: privacy

   Read and modify privacy settings.

.. rst-class:: api-permission-info

Note

The permission privacy is required to use messenger.privacy.websites.*.

.. rst-class:: api-permission-info

Note

The permission privacy is required to use messenger.privacy.websites.*.

.. rst-class:: api-main-section

Types

CookieConfig

.. api-section-annotation-hack::

The settings for cookies.

.. api-header::
   :label: object

   .. _privacy.websites.^cookie^config.behavior:

   .. api-member::
      :name: [``behavior``]
      :refid: privacy-websites-cookie-config-behavior
      :refname: behavior
      :type: (`string`, optional)

      The type of cookies to allow.

      Supported values:

      .. _privacy.websites.^cookie^config.behavior.allow_all:

      .. api-member::
         :name: :value:`allow_all`
         :refid: privacy-websites-cookie-config-behavior-allow-all
         :refname: allow_all

      .. _privacy.websites.^cookie^config.behavior.allow_visited:

      .. api-member::
         :name: :value:`allow_visited`
         :refid: privacy-websites-cookie-config-behavior-allow-visited
         :refname: allow_visited

      .. _privacy.websites.^cookie^config.behavior.reject_all:

      .. api-member::
         :name: :value:`reject_all`
         :refid: privacy-websites-cookie-config-behavior-reject-all
         :refname: reject_all

      .. _privacy.websites.^cookie^config.behavior.reject_third_party:

      .. api-member::
         :name: :value:`reject_third_party`
         :refid: privacy-websites-cookie-config-behavior-reject-third-party
         :refname: reject_third_party

      .. _privacy.websites.^cookie^config.behavior.reject_trackers:

      .. api-member::
         :name: :value:`reject_trackers`
         :refid: privacy-websites-cookie-config-behavior-reject-trackers
         :refname: reject_trackers

      .. _privacy.websites.^cookie^config.behavior.reject_trackers_and_partition_foreign:

      .. api-member::
         :name: :value:`reject_trackers_and_partition_foreign`
         :refid: privacy-websites-cookie-config-behavior-reject-trackers-and-partition-foreign
         :refname: reject_trackers_and_partition_foreign

   .. _privacy.websites.^cookie^config.non^persistent^cookies:

   .. api-member::
      :name: [``nonPersistentCookies``]
      :refid: privacy-websites-cookie-config-non-persistent-cookies
      :refname: nonPersistentCookies
      :type: (boolean, optional) **Deprecated.**

      Whether to create all cookies as nonPersistent (i.e., session) cookies.

TrackingProtectionModeOption

.. api-section-annotation-hack::

The mode for tracking protection.

.. api-header::
   :label: `string`

   .. container:: api-member-node

      .. container:: api-member-description-only

         Supported values:

         .. _privacy.websites.^tracking^protection^mode^option.always:

         .. api-member::
            :name: :value:`always`
            :refid: privacy-websites-tracking-protection-mode-option-always
            :refname: always

         .. _privacy.websites.^tracking^protection^mode^option.never:

         .. api-member::
            :name: :value:`never`
            :refid: privacy-websites-tracking-protection-mode-option-never
            :refname: never

         .. _privacy.websites.^tracking^protection^mode^option.private_browsing:

         .. api-member::
            :name: :value:`private_browsing`
            :refid: privacy-websites-tracking-protection-mode-option-private-browsing
            :refname: private_browsing

.. rst-class:: api-main-section

Settings

.. toctree::
  :hidden:

  cookieConfig <privacy.websites.cookieConfig>
  firstPartyIsolate <privacy.websites.firstPartyIsolate>
  hyperlinkAuditingEnabled <privacy.websites.hyperlinkAuditingEnabled>
  protectedContentEnabled <privacy.websites.protectedContentEnabled>
  referrersEnabled <privacy.websites.referrersEnabled>
  resistFingerprinting <privacy.websites.resistFingerprinting>
  thirdPartyCookiesAllowed <privacy.websites.thirdPartyCookiesAllowed>
  trackingProtectionMode <privacy.websites.trackingProtectionMode>

write cookieConfig
.. api-section-annotation-hack:: -- [Added in TB 59]

Allow users to specify the default settings for allowing cookies, as well as whether all cookies should be created as non-persistent cookies. This setting's value is of type CookieConfig.

Note

The behavior property value "reject_trackers_and_partition_foreign" was introduced in version 78.

Note

The behavior property value "reject_trackers" was introduced in version 64.

.. api-section-annotation-hack:: -- [Added in TB 58]

If enabled, the browser will associate all data (including cookies, HSTS data, cached images, and more) for any third party domains with the domain in the address bar. This prevents third party trackers from using directly stored information to identify you across different websites, but may break websites where you login with a third party account (such as a Facebook or Google login.) The value of this preference is of type boolean, and the default value is false.

.. api-section-annotation-hack:: -- [Added in TB 54]

If enabled, the browser sends auditing pings when requested by a website (&lt;a ping&gt;). The value of this preference is of type boolean, and the default value is true.

.. api-section-annotation-hack::

Available on Windows and ChromeOS only: If enabled, the browser provides a unique ID to plugins in order to run protected content. The value of this preference is of type boolean, and the default value is true.

.. api-section-annotation-hack:: -- [Added in TB 56]

If enabled, the browser sends referer headers with your requests. Yes, the name of this preference doesn't match the misspelled header. No, we're not going to change it. The value of this preference is of type boolean, and the default value is true.

.. api-section-annotation-hack:: -- [Added in TB 58]

If enabled, the browser attempts to appear similar to other users by reporting generic information to websites. This can prevent websites from uniquely identifying users. Examples of data that is spoofed include number of CPU cores, precision of JavaScript timers, the local timezone, and disabling features such as GamePad support, and the WebSpeech and Navigator APIs. The value of this preference is of type boolean, and the default value is false.

.. api-section-annotation-hack::

If disabled, the browser blocks third-party sites from setting cookies. The value of this preference is of type boolean, and the default value is true.

.. api-section-annotation-hack:: -- [Added in TB 57]

Allow users to specify the mode for tracking protection. This setting's value is of type TrackingProtectionModeOption, defaulting to private_browsing_only.