pamelafox/lscache — Issue #11: localStorage disabled in Safari 5.1.2 in Private Browsing mode
Author: austinjackson
Created: 2011-12-01 02:04:28+00:00
State: open

The localStorage check from Modernizr gives a false positive in Safari 5.1.2 when Private Browsing is enabled. I fixed it by using the following in the try block:

if (!!window.localStorage) {
localStorage.setItem('testKey', 1);
localStorage.removeItem('testKey');
return true;
};
return false;

Sorry I didn't submit a change - have only had a github account for 5 minutes.