Hi all,<br><br>There's currently no way to set or get cookies from workers, which makes various types of cookie-based operations problematic.<br><br>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.<br>
<br>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).<br>
<br>So, as an example:<br><br> var allCookies = self.cookie;<br> self.cookie='root_cookie=value;path=/;domain=.<a href="http://example.com">example.com</a>';<br><br>An alternative would be to have explicit getAllCookies() and setCookie() APIs, if we don't like carrying over the document.cookie paradigm.<br>
<br>Any thoughts?<br><br>-atw<br>