[whatwg] HTML Cookie API

On Wed, Feb 24, 2010 at 12:44 PM, Nicholas Zakas <nzakas at yahoo-inc.com> wrote:
> I think there?s always going to be a disconnect between browser developers
> and web developers, since we?re both living in very different worlds.
>
> Like I said, I?m all for making cookie access more rational (as if one could
> argue that it has been at all rational to this point). Right now, though, I
> can?t see a benefit to switching from any of the current synchronous
> approaches to an asynchronous one, as it doesn?t give me enough added
> benefit.

The added benefits are:

1) Higher performance because your page isn't frozen while the browser
jumps across some number of threads and processes to reach the disk.
2) Fewer bugs because you don't have to parse the cookie-string /
manufacture a set-cookie-string yourself.

> The asynchronous approach may be the most performant and
> potentially the easiest to implement, but if it?s out there and everyone is
> still using document.cookie, is there really a net gain?

Folks who want synchronous access to cookies can continue to use
document.cookie.  Folks who want to realize the benefits of the new
API can use the new API.  Sounds like everyone wins.

Adam

Received on Wednesday, 24 February 2010 13:03:21 UTC