-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
44 lines (31 loc) · 1.41 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
title: "WorkerNavigator: globalPrivacyControl property"
short-title: globalPrivacyControl
slug: Web/API/WorkerNavigator/globalPrivacyControl
page-type: web-api-instance-property
status:
- experimental
- non-standard
browser-compat: api.WorkerNavigator.globalPrivacyControl
---
{{APIRef("DOM")}}{{SeeCompatTable}}{{non-standard_header}}
The **`WorkerNavigator.globalPrivacyControl`** read-only property returns the user's [Global Privacy Control](https://globalprivacycontrol.org/) setting for the current website.
This setting indicates whether the user consents to the website or service selling or sharing their personal information with third parties.
The value of the property reflects that of the {{httpheader("Sec-GPC")}} HTTP header.
## Value
`true` if the user explicitly _does not_ grant consent to sell or share their data.
`false` if the user either grants consent, or has not indicated a preference.
## Example
```js
console.log(navigator.globalPrivacyControl);
// "true" if the user has specifically indicated they do not want their data shared or sold, otherwise "false".
```
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- {{HTTPHeader("Sec-GPC")}} header
- [globalprivacycontrol.org](https://globalprivacycontrol.org/)
- [Global Privacy Control Spec](https://privacycg.github.io/gpc-spec/)
- [Do Not Track on Wikipedia](https://en.wikipedia.org/wiki/Do_Not_Track)