johannhof / draft-annevk-johannhof-httpbis-cookies

https://johannhof.github.io/draft-annevk-johannhof-httpbis-cookies/draft-annevk-johannhof-httpbis-cookies.html
Other
0 stars 1 forks source link

Cookie Store API events integration #3

Open annevk opened 1 month ago

annevk commented 1 month ago

https://johannhof.github.io/draft-annevk-johannhof-httpbis-cookies/draft-annevk-johannhof-httpbis-cookies.html is currently lacking in that it doesn't support events.

Now we don't want the I-D to have to deal with events or callbacks. So Johann and I came up with this scheme:

The current Cookie Store API seems to hand-wave a lot of the complexity away, but we hope to improve on that by making it all a bit more grounded. E.g., one of the things that is currently unclear is how the cookie changes are distributed across the various global environments of different origins.

annevk commented 1 month ago

One particular interesting case of this is that Store a Cookie will be followed by a call to Remove Expired Cookies and these might both return the same cookie (meaning it was stored with an expiry-time in the past). The caller will have to deduplicate this into a single removed cookie to be reported through a change event.