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

[whatwg] HTML Cookie API

From: Adam Barth <w3c@adambarth.com>
Date: Wed, 24 Feb 2010 13:03:21 -0800
Message-ID: <5c4444771002241303y3bb29ef2v6f135847f7d37732@mail.gmail.com>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:21 UTC