简体   繁体   中英

Setting a cookie on a domain and picking it up on a sub-domain

I have set a cookie (in Javascript) at: www.sampledomain.com but when I go to blurrrp.sampledomain.com I can't seem to see it :(

My cookie domain is set to "/" but that isn't right :(

您可以为域设置cookie:example.com

That's because x.example.com is not a subdomain of www.example.com .

You need to get rid of the www , or change the subdomain to x.www.example.com .

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