This article is mainly to the cookie in the path and domain attributes in a detailed analysis of the introduction, the need for friends can come to the reference, I hope to help you
1.domain is the domain where the cookie is located, default to the requested address, such as www.jb51.net/test/test.aspx, then domain defaults to www.jb51.net. Cross-domain access, If domain A is t1.test.com, domain B is t2.test.com, then producing a cookie in domain A that can be accessed by domain A and domain B will set that cookie's domain to. test.com; If you want to produce a cookie in domain A that does not have access to domain A and that domain B can access, the The domain of the cookie is set to t2.test.com. 2.path indicates the directory where the cookie resides, asp.net defaults to/, which is the root directory. On the same server there are directories as follows:/test/,/test/cd/,/test/dd/, now set a cookie1 path for/test/,cookie2 path for/test/cd/, All pages under test will be accessible to cookie1, while/test/and/test/dd/subpages cannot access cookie2. This is because the cookie allows the page to be accessed under its path path. 3. The browser keeps the same cookie in both domain and path in one file, and the cookie is separated by *. 4. A cookie with a value-key value pair: It used to be a nam=value single-key-value pair cookie, one that says it's a pair of values that contain multiple subkeys. Now it's finally clear. The cookie format that contains multiple subkey value pairs is name=key1=value1&key2=value2. You can understand that the value of a single key pair holds a custom, multiple-key value string, where the key value is the delimiter, and, of course, you can customize a separator, but use the asp.net to get the & as a split character.