[whatwg] Accessing cookies from workers

Drew Wilson atwilson at google.com
Mon Mar 9 10:18:56 PDT 2009

On Sun, Mar 8, 2009 at 9:59 PM, Jonas Sicking <jonas at sicking.cc> wrote:

> However a much more interesting question is if sites would break if
> the above stopped being true. That is most definitely the case.

Agreed - existing behavior trumps spec ambiguity. However, in this case I
was assuming that breaking existing sites was not an issue since we're
adding completely new functionality (accessing cookies from workers).
Existing sites won't break unless they add worker code that modifies
cookies, although perhaps that's a situation we need to avoid as well.

This is a very interesting suggestion. If we add a cookie access API
> then this would seem like a reasonable thing to require from that API.
OK, to summarize, the suggestion is that we add something like the following
to WorkerGlobalScope:

String getAllCookies() - analogous to document.cookies in the DOM world

void setCookie(newCookie, opt_callback) - sets cookies asynchronously, and
invokes the optional callback once the cookie state been set. Cookies are
guaranteed to be set before any subsequent network requests on that domain
are sent.

Thanks for the feedback.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090309/889175a8/attachment-0002.htm>

More information about the whatwg mailing list