Open In App

HTTP headers | DNT

The HTTP DNT Header is a request header that allows users to choose if their activity could be tracked by each server and web application that they communicate with via HTTP. The generated header field is a mechanism that allows the user to opt-in or out of the tracking. Tracking allows user to experience personalized content on web. The option to opt-out of tracking was created with growing privacy demands among users.



The tracking preference can only be set if a user has enabled it. A user agent is not allowed to display a tracking preference expression if not enabled tracking preference is set by the user.

Syntax:



DNT:0
DNT:1

Directives :

The following field value is generated for HTTP DNT header field if the tracking preference is set as enabled

Note : A DNT Header Field can have zero or more extensions. The extensions are determined by the user agent. A DNT header field can be inserted without a field value if the extension is defined but the tracking preference is not set.

Examples:

Supported Browsers: The browsers supported by HTTP DNT Header are listed below

Article Tags :