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

Dan Witte <dwitte@mozilla.com> Sat, 06 February 2010 00:03 UTC

Return-Path: <dwitte@mozilla.com>
X-Original-To: http-state@core3.amsl.com
Delivered-To: http-state@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id C1D413A6E83 for <http-state@core3.amsl.com>; Fri, 5 Feb 2010 16:03:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Dp7fB31Sqqb7 for <http-state@core3.amsl.com>; Fri, 5 Feb 2010 16:03:54 -0800 (PST)
Received: from mail.mozilla.com (corp01.sj.mozilla.com [63.245.208.141]) by core3.amsl.com (Postfix) with ESMTP id 8091C3A6996 for <http-state@ietf.org>; Fri, 5 Feb 2010 16:03:54 -0800 (PST)
Received: from mail.mozilla.com (mail.mozilla.com [10.2.72.15]) by mail.mozilla.com (Postfix) with ESMTP id 2754E17FC118; Fri, 5 Feb 2010 16:04:36 -0800 (PST)
Date: Fri, 5 Feb 2010 16:04:35 -0800 (PST)
From: Dan Witte <dwitte@mozilla.com>
To: yngve@opera.com
Message-ID: <1767767114.44100.1265414675763.JavaMail.root@cm-mail03.mozilla.org>
In-Reply-To: <op.u7nnk8uyvqd7e2@killashandra.oslo.osa>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Originating-IP: [63.245.220.240]
X-Mailer: Zimbra 6.0.4_GA_2038.RHEL5_64 (ZimbraWebClient - FF3.0 (Linux)/6.0.4_GA_2038.RHEL5_64)
Cc: http-state <http-state@ietf.org>
Subject: Re: [http-state] Ticket 5: Cookie ordering
X-BeenThere: http-state@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Discuss HTTP State Management Mechanism <http-state.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/http-state>, <mailto:http-state-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/http-state>
List-Post: <mailto:http-state@ietf.org>
List-Help: <mailto:http-state-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/http-state>, <mailto:http-state-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 06 Feb 2010 00:03:57 -0000

----- "Yngve Nysaeter Pettersen" <yngve@opera.com> 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.

Indeed. In Firefox, we sort by path length and then creation time. I can't comment as to whether sites depend on it now, but at one point we did drop the creation time sort - and sites broke. https://bugzilla.mozilla.org/show_bug.cgi?id=236772 has some details.

We also found that creation time should be persisted when cookies are modified. I don't have a bug reference handy for this one, but it could be dug up.

I like the idea of ordering by domain. Ultimately, having this stuff in a more storage-esque API where domain and path info are available in the Cookie header, or document.cookie, would make this much less of an issue...

Regards,
Dan.