Last active
November 27, 2015 21:00
-
-
Save kremalicious/900e4c36ba044c4f1f7b to your computer and use it in GitHub Desktop.
Check for user's DNT browser setting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// check for user's DNT browser setting | |
// | |
(function (dnt) { | |
var DNT = 'no'; | |
if (dnt !== "yes" && dnt !== "1") { | |
DNT = 'yes'; | |
} | |
}(navigator.doNotTrack || navigator.msDoNotTrack || window.doNotTrack || window.msDoNotTrack || null)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment