I am using ( navigator.cookieEnabled ) but it gives the result as true even I have selected the option (Block third-party cookies) in my browser can someone tell the way how I can check which type is selected in the cookie option.
Thanks
I am using ( navigator.cookieEnabled ) but it gives the result as true even I have selected the option (Block third-party cookies) in my browser can someone tell the way how I can check which type is selected in the cookie option.
Thanks
try that :
function testCoockies(){
var enabled = false;
// Quick test if browser has cookieEnabled host property
if (navigator.cookieEnabled){
enabled = true;
}
// Create cookie test
document.cookie = "testcookie=1";
enabled = document.cookie.indexOf("testcookie=") != -1;
// Delete cookie test
document.cookie = "testcookie=1; expires=Thu, 01-Jan-1970 00:00:01 GMT";
return enabled;
}
It would detect more effectively cookies block