Open Bug 1475599 Opened 6 years ago Updated 1 month ago

Implement Cookie-Store API

Categories

(Core :: DOM: Core & HTML, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: baku, Unassigned)

References

()

Details

(Keywords: dev-doc-needed, parity-chrome, parity-safari)

Attachments

(1 file, 1 obsolete file)

An asynchronous Javascript cookies API for documents and workers
Attached patch patch (obsolete) — Splinter Review
This is just a proof of concept. It works, but many details are missing:
. the API is not exposed to workers
. not all the WPTs pass

I don't have time to work on this, but if somebody wants to continue the development, this patch is a good starting point. I can also help or be mentor.
Attached patch cookie.patchSplinter Review
Attachment #8991974 - Attachment is obsolete: true
Component: DOM → DOM: Core & HTML
Assignee: nobody → amarchesini

Any eta on this?

It would be great if this could be implemented in Firefox. The API is much nicer to work with than document.cookie, and would allow many developers to remove third party dependencies that they use purely for nice cookie management.

Assignee: amarchesini → nobody
Severity: normal → S3

It looks like Safari is now implementing this API.

FWIW, having an async, far cleaner API for cookies is nice DX and may benefit performance, but I think it's worth calling out that one of the key additions is the "Monitoring Cookies" feature.

In order to achieve this in a polyfill—as per Keith Cirkel's comment—involves using postMessage and BroadcastChannel, which could conflict with other uses of those APIs and would add significant weight to the polyfill.

I'm not suggesting the Monitoring Cookies feature should be implemented in lieu of the rest of the API, I'm just trying to add weight to the need for the overall Cookie Store API to be implemented given that feature is a significant challenge to polyfill.

WebKit appear to have made significant progress on their implementation now, only one bug is outstanding: https://bugs.webkit.org/show_bug.cgi?id=258504 so if this make a Safari release shortly, this would leave Firefox being the only browser without support.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: