Entry
Another way to check if the browser accepts cookies?
Jun 8th, 2000 13:09
Brian Williams,
Sorry this isn't formatted correctly. The textarea box isn't wide
enough.
------------------------------------------------------------------
function check_cookies()
{
if (navigator.appName == "Netscape")
{
netscape.security.PrivilegeManager.enablePrivilege
('UniversalPreferencesRead');
if (navigator.preference('network.cookie.cookieBehavior') !=
0)
return "Accept all cookies"
else if (navigator.preference
('network.cookie.cookieBehavior') != 1)
return "Accept only cookies that get sent back to the
originating server"
else
return "Disabled"
}
else
{ if (navigator.cookieEnabled==true) return "Enabled"
else if (navigator.cookieEnabled==false) return "Disabled"
else return "Unknown"
}
}