Created
June 8, 2011 16:50
-
-
Save wildfalcon/1014807 to your computer and use it in GitHub Desktop.
Local Storage API
This file contains hidden or 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
// to save a value | |
localStorage.setItem(key, value) | |
// to read a value | |
var value = localStorage.getItem(key) | |
// to count items in the cache | |
var count = localStorage.length |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment