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

Manage web storage and cookies #24

Open
muodov opened this issue Jul 13, 2022 · 2 comments
Open

Manage web storage and cookies #24

muodov opened this issue Jul 13, 2022 · 2 comments

Comments

@muodov
Copy link
Contributor

muodov commented Jul 13, 2022

Manage web storage and cookies

Submitter(s)

Maxim Tsoy (DuckDuckGo)

Motivation

Apps loading 3rd-party web content in WebViews may need more granular control over stored data. For example, DuckDuckGo browsers need this for the Fireproof feature, which allows to make exceptions to the cookie/storage removal.

Stakeholders

Browsers based on WebView
WebView vendors

Analysis

  • Webkit provides APIs to retrieve cookies and local/sessionStorage as opaque tokens that can be filtered by hostname. This allows selective removal, although it requires some extra code and workarounds to prevent timing issues (removal is asynchronous).
  • in Webkit, storage is shared between all WKWebView instances, unless it's "non persistent" (in memory), which is not ideal for building web browsers
  • in Android WebView, it is not possible to inspect cookie scopes. You can retrieve cookie names and values, but without knowing other attributes it is impossible to override them properly
  • Android WebView does not provide APIs to manage localStorage/sessionStorage

Related W3C deliverables and/or work items

How is the issue solved in the Browser, and what’s more is needed?

Browsers manage storage using APIs of a specific rendering engine.

@aluhrs13
Copy link

aluhrs13 commented Aug 9, 2022

WebView2 on Windows allows managing access, creation, copy, deletion of cookies through a Cookie Manager API. Other storage would need to be accessed through DevTools Protocol APIs using the Storage and/or DOMStorage domains.

@QingAn
Copy link
Contributor

QingAn commented Aug 23, 2022

As discussed in 2022-08-23 meeting, we agreed it is a valid use case.

QingAn added a commit that referenced this issue Aug 29, 2022
Merge use case #24
QingAn added a commit that referenced this issue Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants