简体   繁体   中英

Is there a way to show cookie in web Page?

i'm trying to show in a web Page every cookie stored in my browser. Of course i know that they're encrypted but i Just want to show which One are stored and what clear information they can reveal. I was thinking to do this with js, am i wrong?

Your site can only access the cookies created on its own domain:

example.com can only access cookies created on example.com

Its not possible to access cookies from other domains.

To get the cookies you can use document.cookie , which only gives you cookies for current domain.

On your page you can visualize cookies, but ONLY the ones generated by your page.

For a webpage (ex. example.com) to be able to read cookies (and potentially visualize them r use them in another way) from a website (ex. facebook.com / twitter.com) is a great security risk. That is why it should not be possible and is not allowed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM