pamelafox / lscache

A localStorage-based memcache-inspired client-side caching library.
Other
1.46k stars 160 forks source link

localStorage disabled in Safari 5.1.2 in Private Browsing mode #11

Closed austinjackson closed 11 years ago

austinjackson commented 12 years ago

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.

boban100janovski commented 11 years ago

So this is still an issue ? The ticket is open

pamelafox commented 11 years ago

Our test does that now, closing.