Reputation: 7682
I'm working locally, but I feel this should still work.
How do I get the cookie that's on another domain?
and then write back to that domain, but have it work cross domain?
thanks!
Upvotes: 1
Views: 2908
Reputation: 14421
Any browser that lets you view cookies that are specifically set for other domains poses a huge security risk for it's users. Cookies can store sensitive information such as session keys, which can be used to fake logins to other websites.
If you have set the cookie yourself, you can set it to be used by any domain if you wish.
Cookies also work for subdomains. For example you can set a cookie to allow access from example.com
, you can read this from admin.example.com
and from www.example.com
, but if it is set for www.example.com
, you will not be able to read it from admin.example.com
.
Upvotes: 3
Reputation: 12506
You can't touch cookies from other domains. This is a security feature built into browsers.
Upvotes: 6