Path and domain properties in cookies
- 2020-03-30 00:58:11
1. The domain is a cookie in the domain, the default for the request of address, such as www.jb51.net/test/test.aspx, then the domain to www.jb51.net by default. For cross-domain access, if domain A is t1.test.com and domain B is t2.test.com, then to produce A cookie accessible to both domain A and domain B in domain A, the domain of the cookie should be set to. If you want to produce A cookie in domain A that is inaccessible to domain A but accessible to domain B, set the domain of that cookie to t2.test.com.
3. The browser will save cookies with the same domain and path in a file, and the cookies are separated by *.
4. Cookie with value key value pair: previously, the cookie with nam=value single key value pair was always used, and the cookie with multiple child key value pairs was ignored. Now I know. The cookie format with multiple child key-value pairs is name=key1=value1&key2=value2. The value of a single-key-value pair can be interpreted as a custom multi-key-value string, where the key-value pair is delimited by an &. You can, of course, customize a delimiter, but you get it with asp.net with an & as the delimiter.