Path problem when using Cookie in browser

assume your current url:
http://abc.com/a/b

in Chrome, call the following valid

  • document.cookie="abc=efg;path=/a"
  • document.cookie="abc=efg;path=/a/b"
  • document.cookie="abc=efg;path=/"

the following are not valid

  • document.cookie="abc=efg;path=/efg"
  • document.cookie="abc=efg;path=/a/efg"

in edge

  • document.cookie="abc=efg;path=/a/efg"

is valid

is there any documentation that can describe the behavior of cookie in various browsers?
I have searched all the specifications I can find but have not described in detail the restrictions on path for cookie

Jun.25,2021
Menu