localStorage is an HTML5 data store. Documentation https://developer.mozilla.org/en/docs/Web/API/Window/localStorage Stores data for the current page. That is, for the background page - one data set. For the content page - a different set of data (for each page its own set). Stores data in the form: name = value (value - string), that is, it does not allow storing composite objects. Moreover, types like true , false will be stored as "true" and "false" . The data is accessed by the synchronous method:
var x = localStorage.x; var x = localStorage['x']; var x = localStorage.getItem('x');
chrome.storage.local - extension data storage. You can access both from the background page and from the content page - this is a single repository. Allows you to store objects, in contrast to localStorage. Access to data occurs asynchronously. Allows you to "listen" to change variables. Warehouse documentation https://developer.chrome.com/extensions/storage
chrome.storage.sync - works like chrome.storage.local , but stores data on the server synchronized with a google account
For extensions, using chrome.storage local / sync is preferable - depends on your needs.