Friday, March 13, 2015

How I detect and use localStorage: a simple JavaScript pattern · Mathias Bynens


Modernizr does it this way (and documents the technique extensively in the source). It could be simplified a bit depending on the browsers and edge cases you wish to support, but for now this is the most robust feature detect out there.
http://bit.ly/18lPjQD

No comments:

Post a Comment