Do Chrome extensions have access to local storage?

Luke picture Luke · Jan 28, 2010 · Viewed 17.1k times · Source

Is it possible to store data in a way that will be accessible after a browser restart in the context of a chrome extension?

Answer

Martin Bartlett picture Martin Bartlett · Feb 10, 2010

Even simpler than that:

To read:

    var myStoredValue = localStorage["TheKeyToMyStoredValue"];

To write:

    localStorage["TheKeyToMyStoredValue"] = myNewValueToStore;

To get rid of:

    delete localStorage["TheKeyToMyStoredValue"];