Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do Chrome extensions have access to local storage?

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

like image 218
Luke Avatar asked Jan 28 '10 08:01

Luke


1 Answers

Even simpler than that:

To read:

    var myStoredValue = localStorage["TheKeyToMyStoredValue"]; 

To write:

    localStorage["TheKeyToMyStoredValue"] = myNewValueToStore; 

To get rid of:

    delete localStorage["TheKeyToMyStoredValue"]; 
like image 80
Martin Bartlett Avatar answered Nov 13 '22 12:11

Martin Bartlett