Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear Site Data for dictionaries #34

Open
horo-t opened this issue Apr 26, 2023 · 10 comments
Open

Clear Site Data for dictionaries #34

horo-t opened this issue Apr 26, 2023 · 10 comments

Comments

@horo-t
Copy link
Contributor

horo-t commented Apr 26, 2023

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.

  • "cache"
  • "cookies"
  • "storage"
  • "executionContexts"
  • "*"

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
Copy link
Collaborator

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
Copy link
Contributor Author

horo-t commented Apr 26, 2023

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
Copy link
Collaborator

pmeenan commented Apr 26, 2023

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
Copy link

annevk commented Apr 26, 2023

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
Copy link
Collaborator

pmeenan commented Apr 26, 2023

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

horo-t added a commit to horo-t/webappsec-clear-site-data that referenced this issue Feb 7, 2024
Currently compression dictionaries are cleared when either the "cache" or "cookies" are set in `Clear-Site-Data`.

But it would be very useful if there is a way to only clear the compression dictionaries without clearing HTTP caches and Cookies.

So, I'd like to propose a new "dictionaries" datatype in Clear-Site-Data HTTP Response Header Field.

WICG/compression-dictionary-transport#34
@horo-t
Copy link
Contributor Author

horo-t commented Feb 7, 2024

@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
Copy link

annevk commented Feb 7, 2024

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
Copy link
Contributor Author

horo-t commented Feb 7, 2024

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
Copy link
Collaborator

pmeenan commented Feb 7, 2024

I created a new issue to discuss the underlying request rather than jumping to an implementation: #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
Copy link
Contributor Author

horo-t commented Feb 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants