aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/web/http/headers/dnt/index.html
blob: 81c152f6a57dae5a99cdbc4a1624ca76e1418fa1 (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---
title: DNT
slug: Web/HTTP/Headers/DNT
translation_of: Web/HTTP/Headers/DNT
---
<div>{{HTTPSidebar}}</div>

<p><strong><code>DNT</code></strong><strong>D</strong>o <strong>N</strong>ot <strong>T</strong>rack,<strong>請勿追蹤</strong>)請求標頭表明用戶針對追蹤程式的設定。它能讓用戶表達自己相較於個人化設定,更在乎個人隱私。</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">標頭類型</th>
   <td>{{Glossary("Request header")}}</td>
  </tr>
  <tr>
   <th scope="row">{{Glossary("Forbidden header name")}}</th>
   <td></td>
  </tr>
 </tbody>
</table>

<h2 id="語法">語法</h2>

<pre class="syntaxbox">DNT: 0
DNT: 1
</pre>

<h2 id="指令">指令</h2>

<dl>
 <dt>0</dt>
 <dd>用戶允許目標網站追蹤之。</dd>
 <dt>1</dt>
 <dd>用戶不允許目標網站追蹤。</dd>
</dl>

<h2 id="示例">示例</h2>

<h3 id="請參考_JavaScript_的_Do_Not_Track">請參考 JavaScript 的 Do Not Track</h3>

<p>用戶的 DNT 設定也能透過 JavaScript 的 {{domxref("Navigator.doNotTrack")}} 設定檢查:</p>

<pre class="brush: js">navigator.doNotTrack; // "0" or "1"</pre>

<h2 id="規範">規範</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">規範</th>
   <th scope="col">狀態</th>
   <th scope="col">註解</th>
  </tr>
  <tr>
   <td>{{SpecName('Tracking','#dnt-header-field', 'DNT Header Field for HTTP Requests')}}</td>
   <td>{{Spec2("Tracking")}}</td>
   <td>初始定義</td>
  </tr>
 </tbody>
</table>

<h2 id="瀏覽器相容性">瀏覽器相容性</h2>

<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>

<p>{{Compat("http.headers.DNT")}}</p>

<h2 id="參見">參見</h2>

<ul>
 <li>{{domxref("Navigator.doNotTrack")}}</li>
 <li>{{HTTPHeader("Tk")}} 標頭</li>
 <li>維基百科的<a href="https://zh.wikipedia.org/zh-tw/%E8%AF%B7%E5%8B%BF%E8%BF%BD%E8%B8%AA">Do Not Track </a></li>
 <li><a href="https://www.eff.org/deeplinks/2011/02/what-does-track-do-not-track-mean">What Does the "Track" in "Do Not Track" Mean? – EFF</a></li>
 <li><a href="http://donottrack.us/">donottrack.us</a></li>
 <li>瀏覽器設定 DNT 的幫助:
  <ul>
   <li><a href="https://www.mozilla.org/zh-tw/firefox/dnt/">Firefox</a></li>
   <li><a href="https://support.google.com/chrome/answer/2790761">Chrome</a></li>
  </ul>
 </li>
</ul>