Can cookie and localStorage access data across websites?

Project is the user name information required by Vue, which is stored in the user"s browser. This user name information can be obtained on other websites
for example, if I log in to Tencent"s website in my browser, can Baidu get my Tencent account information


this impossible


no!
Baidu can't get Tencent's cookie, retweets. If you can, the world will be in chaos.
however, second-level domain names are allowed. For example, www.baidu.com can theoretically obtain cookie of zhidao.baidu.com


based on security considerations, it is impossible to give you


cross-domain reading


No, it's too dangerous. Both cookie and localStorage are stored under the corresponding domain names of local browsers. Cookie will bring them together when making a request, but localStorage will not.

if you can get someone's cookie, on another website, you can get that person's login status, and you can get any information about him on this site.

Menu