开发者

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

If I understand correctly, popup.html and background.html share the same lo开发者_开发百科cal storage since they run in the same sandbox. And content script does not share the same one since it run in another sandbox. Right?


Correct. Calling localStorage from a Chrome extension's Background page, Browser Action page or Page Action page uses the extension's local storage.

Content scripts only run on normal web pages and generally can't access Chrome's extension API, so their local storage access would be limited to the specific website's local storage.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜