Can Do Not Track be bypassed using XHR ?

Checks whether DNT:1 can be made DNT:0 using xhr.setRequestHeader()

By
skeptic_fx 1 Seen 762 times
Tags
DNT XHR
Run this test now.

Results


Tested on
Chrome - 68 - Mac OS X
Test Result
DNT cannot be Bypassed. If you have turned on DNT, then that means the DNT works properly in this browser

Tested on
Firefox - 57 - Windows 10
Test Result
DNT cannot be Bypassed. If you have turned on DNT, then that means the DNT works properly in this browser

Tested on
Googlebot - 2.1 - undefined
Test Result
DNT testing failed. Probably, Some Error Occured

Tested on
IE - 11 - Windows 7
Test Result
DNT has been Bypassed. You could be seeing this if you havent turned DNT ON. If you have turned on DNT, then the DNT feature in current browser can be bypassed

Tested on
Safari - 8 - Mac OS X
Test Result
DNT cannot be Bypassed. If you have turned on DNT, then that means the DNT works properly in this browser

Tested on
Chrome Mobile - 41 - Android
Test Result
DNT testing failed. Probably, Some Error Occured

Tested on
Opera - 47 - Windows 10
Test Result
DNT cannot be Bypassed. If you have turned on DNT, then that means the DNT works properly in this browser

User Script (ENUM_FUNCTION)

					
function test(data){
	// We need to separate properties and access one by one.
try{
    alert('You need to enable Do Not Track feature in this browser for this test to work.');
    var xhr = new XMLHttpRequest();
    xhr.open('GET', '/helper/headers', false); // Same Domain Request, This header should also work X-Domain
    xhr.setRequestHeader('DNT', '0');
    xhr.send();
    var headers = JSON.parse(xhr.responseText);
    if(headers.hasOwnProperty('dnt') && headers.dnt == '0'){
        addError('DNT has been Bypassed.' + ' You could be seeing this if you havent turned DNT ON. If you have turned on DNT, then the DNT feature in current browser can be bypassed'); 
    } else {
        addSuccess('DNT cannot be Bypassed.' + ' If you have turned on DNT, then that means the DNT works properly in this browser'); 
    }
    
}

catch(err){
	addInfo('DNT testing failed.' + ' Probably, Some Error Occured');
}
}
					
			
					
				

Enum Data (ENUM_FUNCTION)

					
var data = [1];