Subject: [http-state] Tab-level cookies for the browser

From: Micah Lemonik <[email-masked]>
Date: Tue, 28 Jul 2009 16:41:26 -0400

Greetings,

We would like to propose the browser add tab-level cookies that will
override the global process-level cookie in a given tab. That is if a tab
override cookie is set on a particular tab, that cookie will be used in
place of the global cookie. Tab level cookies would last the lifetime of a
tab and would propagate to child tabs.
The use case we're trying to accommodate is to be logged into different
google accounts in different tabs. sessionStorage gets us part of the way
there in terms of enabling a per-tab resource that propagates to child tabs,
but sessionStorage doesn't automatically send data to the server on any
request the way cookies do. Essentially we're looking for a solution that 1.
works with cookies for compatibility with existing infrastructure and 2.
isn't limited to XMLHttpRequest usage where we have the ability to set
custom headers.

I would love to hear feedback from this list on how this might work in
browsers and/or alternative solutions.

Thank you,

Micah Lemonik
Staff Software Engineer
Google Inc.

---

From: Bil Corry <[email-masked]>
Date: Wed, 29 Jul 2009 15:05:49 -0500

> isn't limited to XMLHttpRequest usage where we have the ability to set

Note that there's been some discussion of this on the ietf-http-wg list[1], so you may wish to read through that thread for other responses.

I'm wondering if Yngve's Cache Context[2] draft could be adapted to meet your use case.  It provides "a mechanism that permits a webservice to group webpages by associating them in a named context, a 'Cache Context'".  It would require the UA send the context name back to the server, and if so, it could be used to distinguish one tab from another (if I understand the draft correctly).

- Bil

[1] http://lists.w3.org/Archives/Public/ietf-http-wg/2009JulSep/0388.html
[2] http://tools.ietf.org/html/draft-pettersen-cache-context-04