Cookies of domain are sent to subdomain, how to fix?

怎甘沉沦 提交于 2019-12-11 06:27:44

问题


Firefox is sending my ".domain.tld" cookies when I go to sub.domain.tld.

How can I make sure that the browser only sends cookies of ".sub.domain.tld" and not ".domain.tld"?


回答1:


You cannot. If you set a cookie on .domain.tld it will be sent to domain.tld and all subdomains.

Although this may be unrelated to your problem, take a look at sstatic.net - where the Stack Overflow family of sites host their static resources.



来源:https://stackoverflow.com/questions/1789789/cookies-of-domain-are-sent-to-subdomain-how-to-fix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!