To eliminate some ambiguity by reusing some of this , answer:
The request path path matches the specified cookie path if at least one of the following conditions is true:
- The cookie path and the request path are identical.
- The cookie path is the prefix of the request path, and the last character of the cookie path is% x2F ("/").
- The cookie path is the request path prefix and the first character of the request path that is not included in the cookie. path is the% x2F ("/") character.
There is a small (but potentially important) difference between setting a cookie on the path /subfolder1 and the path /subfolder1/ .
If you rely on the former, your request path must begin with the character "% x2F (" / ")" (slash) to guarantee the desired behavior. For example, look at a related answer.
Setting the cookie path simply / eliminates any cases of edges, but as you say, the cookie will be available for the entire domain.
Michael May 13 '16 at 1:09 pm 2016-05-13 13:09
source share