[whatwg] Accessing cookies from workers

Michael Nordman michaeln at google.com
Thu Mar 5 20:53:33 PST 2009

> Jonas (and I) were talking about setRequestHeader(),
> getAllResponseHeaders(), and getResponseHeader().


> postMessage()? :-)

That certainly works for "dedicated workers". Not so great for shared
workers or persistent workers. In the shared case, the postMessage
sender and receiver would have to know the locations of each other to
access and associate cookies at the right level in the path (and a
given shared worker may or may not have a channel open with a "page"
context). In the persistent case, there may not be anyone to
postMessage with at all.

I don't see any fundamental reason to not allow cookies to be
read/written from a worker context? I think of them as DOM/UI 'less
frames in many respects.

More information about the whatwg mailing list