Javascript only detection of “Do not track” settings in IE11

纵饮孤独 提交于 2019-12-04 15:21:48

As per this answer from Microsoft: "The standard was updated" as of IE11, placing the doNotTrack property on the window object instead.

Not all browsers are up to date with this yet, only IE11 and Safari 6.1.1+ have updated at this time as per this window properties table.

As of this writing there is a current disagreement/discussion from Mozilla as to whether doNotTrack should be a window or navigator property.

Have you tried with window.external.msTrackingProtectionEnabled(), which returns a boolean and is implemented in IE 9/10. I cannot test right now, but it's probably supported in IE 11 as well.

http://ie.microsoft.com/TEStdrive/Browser/DoNotTrack/Default.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!