Check whether the Do not track (DNT) policy is enabled in user's browser or not
- Supports all major browsers (from Internet Explorer 6)
- 0 dependencies
- Written in TypeScript
$ npm install is-dnt
const isDnt = require('is-dnt');
isDnt(); //=> true
Returns a boolean
of whether the Do not track policy is enabled and undefined
if the browser does not support DNT.
This package uses the solution described by Corbin Davenport in his How to correctly check for Do Not Track with JavaScript post.
MIT © Antoni Kepinski