The Changelog

Open Source moves fast. Keep up.

jStorage – stash that hash using jQuery, Prototype, or Mootools

jStorage from Andris Reinman is a small (2kb) simple wrapper for popular javascript frameworks to abstract local storage. HTML5 local storage is used if present and it even supports userData in older versions of IE.

compatibility chart

The simple API supports, get, set, delete and flush operations:

// set a value
$.jStorage.set(key, value)

// retrieve a value with a default if not set
value = $.jStorage.get(key, "default value")

// delete a key, throws exception if not set

// flush entire cache


[Source on GitHub] [Homepage]

Have comments? Send a tweet to @TheChangelog on Twitter.

Subscribe to The Changelog Weekly – our weekly email covering everything that hits our open source radar.