Domain-related policies of the browser when passing cookies

Source: Internet
Author: User

A cookie transfer problem occurs in a specific IE6 version (2900.2180 XP SP2 GDR) recently. For this reason, refer to rfc2109.http: // tools.ietf.org/html/rfc2109

 

If Chrome/FF sends data to a. B .c.com, the cookie with domain B .c.com will not be submitted, but the cookie with. B .c.com will be submitted because the cookie that can be submitted must meet the domain-matches condition, as rfc2109 said, x.y.com domain-matches .y.com but not y.com. Therefore, this is a bug in a specific version of IE6. It submits B .c.com cookies. Rfc2109 stipulates that an explicitly specified domain must always start with a dot. Domain defaults to the request-host. (Note that there is no dot at the beginning of request-host .)

 

Why does the default value give an nonstandard domain instead of adding a point at the beginning?

 

Conclusion:

When the browser transmits a cookie, it will pass all the cookies of the current domain name and its parent domain (which must start. Sending data to a. B .c.com includes the following cookies:

A. B .c.com

. B .c.com

.C.com


If the server wants to specify the cookie domain, it should start.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.