Skip to content

Need clarification for cookie domain format #1143

Open
@aldaris

Description

@aldaris

The add cookie command doesn't spell out the exact format of the cookie domain value, based on the current behavior of browsers I think the expectation is something like:

  • if the cookie domain has a preceding dot character, the browser should ignore the dot character and create the cookie as a domain cookie
  • if the cookie domain does not have a preceding dot character, then the browser should still create a domain cookie
  • if the cookie domain field is absent in the request then the cookie should be created as a host only cookie

Similarly it is not clear how get named cookie should report the domain of the cookie. Firefox for example currently returns domain cookies with a preceding dot character, but host only cookies are represented by returning the value without a preceding dot character, to give an example
Domain cookie where domain is google.com:

"domain": ".google.com"

Host only cookie for google.com:

"domain": "google.com"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions