W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2010

[whatwg] HTML Cookie API

From: Diogo Resende <dresende@thinkdigital.pt>
Date: Thu, 25 Feb 2010 14:54:23 +0000
Message-ID: <1267109663.14249.10.camel@nasgul.local>
On Wed, 2010-02-24 at 11:21 -0800, Darin Fisher wrote:
> For reference, reading document.cookie has measurable performance cost
> in Chromium since the cookie jar lives in a process separate from the
> process running JavaScript.  We could have minimized this cost by
> caching the cookies locally, but then there are cache coherency
> issues.
> 
> 
> I think the cookie APIs should have been asynchronous from the start.
>  Whenever an API is backed by I/O, asynchronous should be the rule.  
> 
> 
> -Darin

What about something like:

document.pushCookies(function () {
	// cookies have been pushed to the js process
	var x = document.getCookie("x");
	// whatever...
});
Received on Thursday, 25 February 2010 06:54:23 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:56 UTC