WICG / compression-dictionary-transport

Other
92 stars 8 forks source link

Clear Site Data for dictionaries #34

Open horo-t opened 1 year ago

horo-t commented 1 year ago

There is no way to delete registered dictionaries.

I think we should support it using Clear Site Data. The Clear Site Data spec defines following types.

I think Web developers will want to delete dictionaries without deleting other types ("cache", "cookies", "storage"). So we should introduce a new type "dictionaries".

Clear-Site-Data: "dictionaries"
yoavweiss commented 1 year ago

Should "dictionaries" be separate from "cache" here?

I'd also assume that when users delete their cache (regardless of ClearSiteData), dictionaries will go away.

horo-t commented 1 year ago

On second thought, I feel like clearing the dictionaries for Clear-Site-Data: "cache" may be enough. @pmeenan Do you have any thought about it?

I'd also assume that when users delete their cache (regardless of ClearSiteData), dictionaries will go away.

Yes, dictionaries should be deleted when the user clears the cache or cookies from the browser's settings page.

pmeenan commented 1 year ago

I don't think we need a new entry specifically. The dictionaries should be cleared when either the cache or cookies are cleared. Actual implementation may be a bit more complex, but I find it easiest to think about the dictionary information as metadata about cache entries. If the cache entries go away then the dictionary is also gone.

The metadata has cookie-like concerns so it needs to also be cleared when cookies are cleared.

The argument could be made that it only needs to be cleared from clear-site-data when cache is cleared but if a user triggers UI to clear cookies then it also needs to be cleared but it feels like it would be cleaner to just always nuke the dictionaries when either the underlying HTTP cache gets cleared or user state is cleared.

annevk commented 1 year ago

Please don't conflate Clear-Site-Data with "Clear cookies" UI. The latter has to take all kinds of things into consideration and doesn't have much relation to "cookies". The keying is also very different.

From the other discussion it seems like "cache" might be the way to go.

pmeenan commented 1 year ago

sgtm. It's much cleaner to describe that way too. I'll add some text to cover that case.

horo-t commented 4 months ago

@pmeenan As discussed internally, it looks useful if there is a way to only clear the compression dictionaries without clearing HTTP caches and Cookies. So I created a PR to the spec of Clear Site Data and Chromium CL.

annevk commented 4 months ago

Discussing it internally does not a standard make. If you want to change what we previously came to agreement on you should put forward some arguments.

horo-t commented 4 months ago

Oh yes, I'm sorry.

A developer trying out Compression Dictionary's Origin Trial requested that we provide a way to clear saved dictionaries. This is very important for the developer to run experiments with this new feature and measure the impact on site performance.

pmeenan commented 4 months ago

I created a new issue to discuss the underlying request rather than jumping to an implementation: https://github.com/WICG/compression-dictionary-transport/issues/54

There's nothing sensitive about the internal discussions, they were with an origin trial user struggling with A/B testing the effectiveness and it will be even more complicated after it is not gated by a trial (though I'm not sure that's a concern for the web platform).

horo-t commented 4 months ago

Sounds good. Thank you for filing the new issue. I marked the Spec PR and Chromium CL as draft.