Navigator: globalPrivacyControl プロパティ

Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。

非標準: この機能は標準ではなく、標準化の予定もありません。公開されているウェブサイトには使用しないでください。ユーザーによっては使用できないことがあります。実装ごとに大きな差があることもあり、将来は振る舞いが変わるかもしれません。

Navigator.globalPrivacyControl プロパティはユーザーのグローバルプライバシー制御設定を返します。この設定は、ウェブサイトやサービスワーカースクリプトがユーザーの個人情報を第三者に販売したり、共有したりすることにユーザーが同意するかどうかを示します。

プロパティの値は、 Sec-GPC (en-US) HTTP ヘッダーの値を反映します。

Sec-GPC 値 意味
1 ユーザーは、自分のデータを販売または共有することに同意していません。
0 ユーザーは、データの販売または共有に同意しました。
unspecified ユーザーはデータに関してまだ同意していません。

js
console.log(navigator.globalPrivacyControl);
// prints "1" indicating user does not want their data shared or sold.
// prints "0" if the user consents to their data being shared or sold.
// prints "unspecified" if Sec-GPC header is not present.

仕様書

No specification found

No specification data found for api.Navigator.globalPrivacyControl.
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

関連情報