Skip to content

Commit

Permalink
navigator.cookieEnabled is a false pos in ie9. dont try it as a techn…
Browse files Browse the repository at this point in the history
…ique. thx @alrra. fixes #666
  • Loading branch information
paulirish committed Sep 4, 2012
1 parent 5c533d7 commit 6a0ddcd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions feature-detects/cookies.js
Expand Up @@ -3,8 +3,9 @@
// https://github.com/Modernizr/Modernizr/issues/191

Modernizr.addTest('cookies', function () {
// Quick test if browser has cookieEnabled host property
if (navigator.cookieEnabled) return true;

// navigator.cookieEnabled is in IE9 but always true. Don't rely on it.

// Create cookie
document.cookie = "cookietest=1";
var ret = document.cookie.indexOf("cookietest=") != -1;
Expand Down

0 comments on commit 6a0ddcd

Please sign in to comment.