Skip to content

Instantly share code, notes, and snippets.

@wildfalcon
Created June 8, 2011 16:50
Show Gist options
  • Save wildfalcon/1014807 to your computer and use it in GitHub Desktop.
Save wildfalcon/1014807 to your computer and use it in GitHub Desktop.
Local Storage API
// 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