How do browser cookie domains work?

后端 未结 9 2154
逝去的感伤
逝去的感伤 2020-11-22 05:34

Due to weird domain/subdomain cookie issues that I\'m getting, I\'d like to know how browsers handle cookies. If they do it in different ways, it would also be nice to know

9条回答
  •  萌比男神i
    2020-11-22 05:53

    Will www.example.com be able to set cookie for .com?

    No, but example.com.fr may be able to set a cookie for example2.com.fr. Firefox protects against this by maintaining a list of TLDs: http://securitylabs.websense.com/content/Blogs/3108.aspx

    Apparently Internet Explorer doesn't allow two-letter domains to set cookies, which I suppose explains why o2.ie simply redirects to o2online.ie. I'd often wondered that.

提交回复
热议问题