[whatwg] Accessing cookies from workers
atwilson at google.com
Thu Mar 5 15:02:13 PST 2009
There's currently no way to set or get cookies from workers, which makes
various types of cookie-based operations problematic.
I'd like to suggest that we add an API to workers to support this, via a
"cookie" attribute on the WorkerGlobalScope interface. This cookie attribute
would act like the document.cookie attribute from page context.
When setting cookies, the cookie path would default to the path of the
script associated with the worker. Likewise, the cookie domain would default
to the domain of the worker itself (i.e. self.location.hostname).
So, as an example:
var allCookies = self.cookie;
An alternative would be to have explicit getAllCookies() and setCookie()
APIs, if we don't like carrying over the document.cookie paradigm.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg