cookie or localStorage with chrome extensions

后端 未结 4 1470
我在风中等你
我在风中等你 2020-12-21 09:21

I\'ve read all the other q\'s here regarding the topic but couldn\'t solve my problem.
I\'m setting on my website the email of the user in the localStorage and i want to

4条回答
  •  孤城傲影
    2020-12-21 10:05

    You do not want to use cookies when localstorage can do. That is because

    • Cookies can be accessed/modified through background page only.
    • Cookies are stored in context of a url/domain and not extension. So you will have to store a cookie for every domain that you wish to operate upon.
    • With every HttpRequest all the cookies associated with corresponding url/domain gets transmitted to server, so in effect you will be adding overhead to user's requests.)

提交回复
热议问题