DNT
请求首部 DNT
(Do Not Track) 表明了用户对于网站追踪的偏好。它允许用户指定自己是否更注重个人隐私还是定制化内容。
Header type | Request header |
---|---|
Forbidden header name | yes |
语法
DNT: 0 DNT: 1
指令
示例
使用 JavaScript 读取“不追踪”(Do Not Track)状态
用户对 DNT 的设置还可以使用 Navigator.doNotTrack
属性进行读取:
js
navigator.doNotTrack; // "0" or "1"
规范
No specification found
No specification data found for http.headers.DNT
.
Check for problems with this page or contribute a missing spec_url
to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
DNT |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Non-standard. Check cross-browser support before using.
- Deprecated. Not for use in new websites.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.