-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k

Description
For dnt_helper.js
in node.org
, I've noticed there's a snippet of codes to tell whether the user has enabled dnt tracker
or not, some of them are (take key parts):
function _dntEnabled(dnt, userAgent) {
'use strict';
// for old version of IE we need to use the msDoNotTrack property of navigator
// on newer versions, and newer platforms, this is doNotTrack but, on the window object
// Safari also exposes the property on the window object.
var dntStatus = dnt || navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
var ua = userAgent || navigator.userAgent;
// List of Windows versions known to not implement DNT according to the standard.
var anomalousWinVersions = ['Windows NT 6.1', 'Windows NT 6.2', 'Windows NT 6.3'];
.....
// With old versions of IE, DNT did not exist so we simply return false;
......
} else if (isIE && platform && anomalousWinVersions.indexOf(platform.toString()) !== -1) {
// default is on, which does not honor the specification
dntStatus = 'Unspecified';
.....
return dntStatus === 'Enabled';
}
It seems that since IE9, we've got "Do Not Track Me" function. And in IE 11, it'd be 'Windows NT 6.3'. So I suspect whether it has nothing to do with the 'platform'.
Now take IE 9 as an example:
As for IE 11, we've automatically enabled this here:
https://support.microsoft.com/en-us/help/17288/windows-internet-explorer-11-use-do-not-track
I'm not sure whether this is a bug in the codes, but IE9 (since) has really started this function. I suggest we should take the IE version (>=9) as a level to check whether we've supported dnt
or not?
What do you think of this?
PS:Checked all the browsers, the result of dnt
is:
For borwser dns support info, plz see: https://testdrive-archive.azurewebsites.net/Browser/DoNotTrack/Default.html