How to detect that JavaScript or Cookies are disabled in the user\'s browser and notify him any help ?
As the cookie detection didn't work in IE 11, I suggest the Modernizr approach:
function areCookiesEnabled() {
try {
document.cookie = 'cookietest=1';
var cookiesEnabled = document.cookie.indexOf('cookietest=') !== -1;
document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';
return cookiesEnabled;
} catch (e) {
return false;
}
}
https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cookies.js