A user agent's Global Privacy Control setting is attached to HTTP requests as the               Sec-GPC request header. This header's v

Interacting with Global Privacy Control

submited by
Style Pass
2024-11-30 23:00:07

A user agent's Global Privacy Control setting is attached to HTTP requests as the Sec-GPC request header. This header's value will be "1" if enabled, and not present otherwise. Interacting with this will vary depending on the application back-end. Example code is Node.js/Express.

The navigator.globalPrivacyControl property enables client-side script to determine a user agent's Global Privacy Control setting. This value mirrors the value sent in the Sec-GPC header: it will equal true if the Sec-GPC header sent is equal to "1", and false otherwise.

Leave a Comment