DNT

DNTDo Not Track,請勿追蹤)請求標頭表明用戶針對追蹤程式的設定。它能讓用戶表達自己相較於個人化設定,更在乎個人隱私。

標頭類型 Request header
Forbidden header name

語法

DNT: 0
DNT: 1

指令

0

用戶允許目標網站追蹤之。

1

用戶不允許目標網站追蹤。

示例

請參考 JavaScript 的 Do Not Track

用戶的 DNT 設定也能透過 JavaScript 的 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 GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
DNT
DeprecatedNon-standard

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.

參見