Is there a way to respect the Do Not Track (DNT) settings in all browsers using only JavaScript? I do not have access to server-side code on the host server. I found the following solution on Stack Overflow:
var isDNT = navigator.doNotTrack == "yes" || navigator.doNotTrack == "1" || navigator.msDoNotTrack == "1";
This method works in most browsers, but I encountered issues with IE11 (specifically version 11.0.9600.16428 when run through Spoon.net), as it does not seem to recognize any of the DNT properties mentioned above. I tried changing the DNT preference through Internet Options > Advanced > Security ("Always send a Do Not Track header") and via Safety > Turn on tracking protection.
Can anyone confirm if this is a bug in IE11 or suggest an alternative JavaScript-only approach to detect these settings?
Thanks in advance, Ben