Navigator: doNotTrack プロパティ
非推奨;: この機能は非推奨になりました。まだ対応しているブラウザーがあるかもしれませんが、すでに関連するウェブ標準から削除されているか、削除の手続き中であるか、互換性のためだけに残されている可能性があります。使用を避け、できれば既存のコードは更新してください。このページの下部にある互換性一覧表を見て判断してください。この機能は突然動作しなくなる可能性があることに注意してください。
Navigator.doNotTrack
プロパティは、ユーザーの Do Not Track 設定を返します。これは、ユーザーがウェブサイトと広告主に対して追跡しないよう要求しているかどうかを示します。
プロパティの値は HTTP の DNT
ヘッダーの値、つまり、 "1
", "0
", "unspecified
" の値を返します。
値
文字列または null
です。
例
console.log(navigator.doNotTrack);
// DNT が有効な場合は "1" です。追跡をオプトインした場合は "0" になります。それ以外は "unspecified" です。
仕様書
No specification found
No specification data found for api.Navigator.doNotTrack
.
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 | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
doNotTrack |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Non-standard. Check cross-browser support before using.
- Deprecated. Not for use in new websites.
- See implementation notes.
関連情報
DNT
HTTP ヘッダー