How to check Cookie is enabled or not in JavaScript
The below JavaScript code will check whether the browser is cookie enabled or not. Here the value of navigator.cookieEnabled is equal to 0 shows that the cookie is disabled else cookie is enabled.
if (navigator.cookieEnabled == 0) {
alert("You need to enable cookies for this site to load properly!");
}
