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.
浏览器兼容性
BCD tables only load in the browser