Created
October 20, 2011 12:51
-
-
Save gipi/1301059 to your computer and use it in GitHub Desktop.
Check HTML5 storage support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// via dive into html5 | |
function supports_local_storage() { | |
try { | |
return 'localStorage' in window && window['localStorage'] !== null; | |
} catch(e){ | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment