Can localStorage be modified by a client?

前端 未结 2 1525
我寻月下人不归
我寻月下人不归 2021-01-04 11:29

I\'m attempting to use localStorage as a cookie replacement (detest cookies) so users can stay signed in on a site I operate.

What I planned so far was to save the u

2条回答
  •  佛祖请我去吃肉
    2021-01-04 12:25

    Local storage is bound to the domain, so in regular case the user cannot change it on any other domain or on localhost.

    It is also bound per user/browser, i.e. no third party has access to ones local storage.

    Nevertheless local storage is in the end a file on the user's file system and may be hacked.

提交回复
热议问题