Add ability for WebExtensions to access websites' localStorage.
Categories
(WebExtensions :: Storage, enhancement, P5)
Tracking
(firefox57 wontfix)
Tracking | Status | |
---|---|---|
firefox57 | --- | wontfix |
People
(Reporter: snprintfv, Unassigned)
Details
(Whiteboard: [design-decision-needed])
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Comment 3•7 years ago
|
||
Comment 5•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Updated•2 years ago
|
Comment 7•1 year ago
|
||
Actually, now as Add-ons can finally be developed for Android, I decided to have a go to get my preferred "Cookie behavior", I used on Desktop for decades, to Android: I want all tracking relevant data (Cookies and local storage) to go if I close or restart the browser with exception of a very small hand selected whitelist of just a handful websites I don't want to be logged out. This is possible on Desktop but not on Android where I have to clear all browsing data and then have to re-login everywhere.
It is very possible to create something like this for cookies only. The cookies API gives great control over everything stored by websites. Fine granular filtering is possible and whatever I selected based on filtering can be deleted easily. But just clearing cookies does not stop tracking anymore, now as other techniques are possible. An API like this is missing for "local storage". IMHO it could be pretty similar to the "cookies" API. Call it "webstorage" and start with a copy of the "cookies" API. Then do minor changes where cookies and local storage differ.
About the https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browsingData API:
Yes, it has a "hostnames" property which can be set for "removeLocalStorage()", but this is blacklist only. What I want to have is a whitelist. To make this possible with the existing API one of the following would be needed:
- A way to invert the "hostnames" property to switch it from "blacklist" to "whitelist".
- A way to know which websites actually have something stored using "local storage". Meaning some kind of "query API" to get a list. Maybe add additional info to this API, like a field which tells the amount of data stored by a domain in bytes. This would allow to create a similar dialog of what Firefox Desktop has, where the amount of storage per domain is displayed.
Probably the second option would be the most useful one as it allows to populate a list where the user can pick entries from to be added to a whitelist. An Add-on could then simply get the list of domains which have something stored, remove the whitelisted entries from that and then use the filtered list for the "hostnames" property.
Description
•