HTML 5 Storage

Saving objects use this:

Cross Platform Stuff:

Saving context.getImageData to a sessionStorage with html5?

W3C Web Storage Working Draft (

interface Storage {
  readonly attribute unsigned long length;
  DOMString? key(unsigned long index);
  getter DOMString getItem(DOMString key);
  setter creator void setItem(DOMString key, DOMString value);
  deleter void removeItem(DOMString key);
  void clear();
interface WindowLocalStorage {
  readonly attribute Storage localStorage;
Window implements WindowLocalStorage;
interface WindowSessionStorage {
  readonly attribute Storage sessionStorage;
Window implements WindowSessionStorage;

interface StorageEvent : Event {
readonly attribute DOMString key;
readonly attribute DOMString? oldValue;
readonly attribute DOMString? newValue;
readonly attribute DOMString url;
readonly attribute Storage? storageArea; void initStorageEvent(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, DOMString keyArg, DOMString? oldValueArg, DOMString? newValueArg, DOMString urlArg, Storage? storageAreaArg);

Detecting Storage APIs: Due to an unfortunate bug in older versions of Firefox, this test will raise an exception if cookies are disabled, so the entire test is wrapped in a try..catch statement.

function supports_local_storage() { try {  return 'localStorage' in window && window['localStorage'] !== null;   } catch(e) {   return false;   } }