Consider improving the UI for cookies set with explicit domain attribute
Categories
(DevTools :: Netmonitor, enhancement)
Tracking
(Not tracked)
People
(Reporter: edgul, Unassigned)
References
(Blocks 1 open bug)
Details
Currently, when we set a cookie that has explicitly used a Domain
the domain value is prefixed with a .
.
This can be seen in the devtools storage panel and we even use this notation down into the cookie DB.
This is a meaningful piece of information because it affects how cookies are sent to servers sharing sub/base domains:
- implicit (domain) set cookies should only be visible on the exact domains they are set.
- explicit (domain) set domains will be visible on the exact site and from it's subdomains. For example: a cookie on example.com is visible on example.com and sub.example.com, but a cookie set on sub.example.com will only be visible on sub.example.com
Though there is occasional confusion in user bug reports and documentation PRs surrounding the comparision of a given domain .example.com
against example.com
when in fact for the purposes of domain comparison the leading dot is ignored.
FWIW, chromium uses a similar .domain.com
notation to indicate an explicit Domain
attribute.
Can we consider some kind of UI improvement to reduce this confusion?
Some ideas:
- info popup on-hover element
- don't show leading
.
and add an additional column
Comment 1•23 days ago
|
||
I vote against the hover-tip idea. It's not obvious it's there so it doesn't make the basic display any easier to read, and I imagine it's not great for accessibility, either.
Would we ever use the developer tools view on multiple sites at once? Currently the host is shown as the selected item in the storage navigation bar on the left. Since it's not a mystery what host we're talking about we could show a blank "Domain" for a Host cookie, and if there is a domain we could show it without the leading dot. This would then make the dev tools view look like the syntax used to create the cookie and might be less confusing, at the cost of having to do a little translation into and out of our database.
That would be much clearer than our current display where the only difference between a host and domain cookie is the presence of one of the smallest and skinniest characters in ASCII.
A separate column that conveys the boolean idea "this is a host (or domain) cookie" could work, but I'm not a huge fan. I'm always feeling like my columns are squeezed in Dev Tools—especially when working on my laptop—that I wouldn't want to have to add another column. Although it's only one bit of information, the column itself would be much wider than one character because the contents or header wording have to make sense.
Comment 2•22 days ago
|
||
I agree with Dan's opinion above - although I'd appreciate some feedback from devtools folks.
We currently match what Chrome is doing, but that doesn't mean we can't do better.
The fact that we already have the "current hostname" in the bar on the left does indicate we're probably duplicating info and we could possible do better.
Comment 3•9 days ago
|
||
I generally agree with Dan's opinion. Aligning the dev tools view with the actual setting cookies behavior is a good way to reduce developers' confusion. However, I have a concern about removing the leading dot; developers might be confused by the old definition of the domain field.
Description
•