Subject: Re: [http-state] Ticket 5: Cookie ordering

From: Dan Witte <[email-masked]>
Date: Mon, 8 Feb 2010 10:19:03 -0800 (PST)

I'd also be willing to change Firefox's behavior to match IE. I dislike creation date sorting, and we implemented it because sites seemed to rely on it at the time - if we can revisit this and get rid of it, so much the better.

Right now we're doing alpha releases for Firefox.next, so the timing is ripe.

Dan

----- "Adam Barth" <[email-masked]> wrote:

> Would you be willing to share your test cases?  I'd like to add them
> to the test suite.
> 
> Thanks,
> Adam
> 
> 
> On Mon, Feb 8, 2010 at 8:19 AM, Yngve Nysaeter Pettersen
> <[email-masked]> wrote:
> > On Fri, 05 Feb 2010 13:56:58 +0100, Yngve Nysaeter Pettersen
> > <[email-masked]> wrote:
> >>
> >> IOW, if ordering is determined by anything but the domain and path
> the
> >> sequence of cookie is going to vary depending on which servers the
> clients
> >> visits and the sequence it visits them, and this might cause
> significant
> >> problems for a server that considers ordering significant.
> >
> > Some testing by a couple of my colleagues setting two cookies with
> the same
> > name (and path) "host-only" and "domain-wide" have found the
> following in
> > browsers other than Opera:
> >
> > -----
> > Visit order: Host-only, domain-wide
> > Cookie order:  "host-only", "domain-wide"
> > -----
> >
> > -----
> > Visit order: domain-wide, Host-only
> > Cookie order (IE):  "host-only", "domain-wide"
> > Cookie order (Others): "domain-wide", "host-only"
> > -----
> >
> > To me it looks like IE is sorting by domain, at the same path level,
> with FF
> > and Safari (the two tested) sort on creation data.
> >
> > The consequence is that there is apparently three deployed ways to
> send
> > cookies:
> >
> >   - Cookies at the same path level are grouped and sorted by
> creation date,
> > earliest first (FF&co)
> >   - Cookies at the same path level are grouped and sorted by domain,
> most
> > specific first (IE)
> >   - Cookies are grouped by domain (most specific first), then sorted
> by path
> > (most specific first) within each domain (Opera)
> >
> > IMO the creation date method is less predictable than the other two,
> and
> > will cause problems for sites depending on a specific sequence of
> cookies.
> >
> > My suggestion would be that the spec should recommend ordering an
> ordering
> > based on on both domain and path (order of preference to be
> decided), as
> > that will be more predictable for sites using multiple cookies with
> the same
> > name at various domain and path levels.
> >
> > --
> > Sincerely,
> > Yngve N. Pettersen
> >
> ********************************************************************
> > Senior Developer                     Email: [email-masked]
> > Opera Software ASA                   http://www.opera.com/
> > Phone:  +47 24 16 42 60              Fax:    +47 24 16 40 01
> >
> ********************************************************************
> > _______________________________________________
> > http-state mailing list
> > [email-masked]
> > https://www.ietf.org/mailman/listinfo/http-state
> >
> _______________________________________________
> http-state mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/http-state

---

From: Adam Barth <[email-masked]>
Date: Mon, 8 Feb 2010 10:36:07 -0800

> I'd also be willing to change Firefox's behavior to match IE. I dislike creation date sorting, and we implemented it because sites seemed to rely on it at the time - if we can revisit this and get…

We should be careful to test IE's behavior thoroughly before
attempting to match it, which is why I'm hoping Yngve will share his
test cases.  :)

I'm quite happy to spec whichever cookie ordering implementations converge on.

Adam