Do popup.html and background.html share the same local storage?

If I understand correctly, popup.html and background.html use the same local storage, as they run in the same sandbox. And the content script does not use the same file as it runs in a different sandbox. Right?

+6
source share
1 answer

Right. Calling localStorage from an alternate Chrome page, Browser Action page, or Page Action page uses local extension storage.

Content scripts run only on regular web pages and, as a rule, cannot access the Chrome extension API, so their local access to the store will be limited to local storage on the local computer.

+10
source

Source: https://habr.com/ru/post/888004/


All Articles