Open Bug 1838506 Opened 2 years ago Updated 1 day ago

[meta] Implement Clear-Site-Data: cache

Categories

(Toolkit :: Data Sanitization, enhancement)

enhancement

Tracking

()

People

(Reporter: zcorpan, Assigned: manuel)

References

(Depends on 14 open bugs, Blocks 1 open bug)

Details

(4 keywords, Whiteboard: webcompat:risk-high )

In https://bugzilla.mozilla.org/show_bug.cgi?id=1671182 "cache" was unshipped. It has been supported in Chrome since v61 and is supported in Safari TP (but not yet shipped even though it was originally mentioned in the release notes for Safari 16.4).

"cache" should also prevent bfcache, so that banks can use it as a reliable cross-browser mechanism to avoid bfcache. See https://github.com/whatwg/html/issues/5880#issuecomment-1591795664

This is assuming https://github.com/privacycg/storage-partitioning/issues/11 is resolved, otherwise we should instead see if "cache" can be removed from other browsers and we can try to solve the bfcache opt-out in a different way.

Given that ClearSiteData.cpp lives in Toolkit :: Data Sanitization and the semantics around "cache" does not actually seem relate to storage[1], I am moving this to that component. That said, at a high level this is probably a cross-cutting concern and in particular I could see an implementation for this needing to ask the CanonicalBrowsingContexts and/or ContentParents for help to relay the clearing request.

1: There is some discussion in https://github.com/privacycg/storage-partitioning/issues/11 that does mention storage shelves and the storage key, but that is because the issue in general is discussing clear-site-data as a whole, not just the "cache" directive. My understanding is that "cache" explicitly relates to caches built using the network partition key or at least not built using the storage key.

Component: Storage: StorageManager → Data Sanitization
Product: Core → Toolkit

https://github.com/privacycg/storage-partitioning/issues/11 has been left open without any further work toward agreement. I'm surprised that Safari shipped it because when we un-shipped it, they had not and we had raised issues with it being underspecified and having privacy issues. There are also no WPT for "cache" in the clear-site-data folder.

On the upside, it would be simple to restore our implementation of it. Bug 1821651 actually removed the pref'd off behavior.

On the downside, I don't think our implementation never included the bfcache.
I don't see any direct clearing of the bfcache via our ClearDataService, however we do seem to disable the back and forward buttons from the UI when the ClearDataService is run with the Ci.nsIClearDataService.CLEAR_SESSION_HISTORY flag.

Keywords: priv-webcompat
Assignee: nobody → manuel

This is a two-step process:

  1. re-land previous implementation (networking cache, it likely addressed https://github.com/privacycg/storage-partitioning/issues/11, need to verify that)
  2. implement bf-cache clearing. This depends on SHIP (Session History In Parent) being enabled all platforms. This is planned to land soon, likely tracked in Bug 1736121.

Clear-Site: cache

The concerns for issue 11 were likely addressed by Bug 1685355.

Bug 1744611 was closed as WONTFIX due to disabling the feature, but needs attention again.

Bug 1730197 should probably also get some attention before enabling Clear-Site: cache again

Depends on: 1744611, 1837276
Keywords: meta
See Also: 18372761671182, 1730197, 1821651
Summary: Implement Clear-Site-Data: cache → [meta] Implement Clear-Site-Data: cache
Depends on: 1930500
Depends on: 1930501
Whiteboard: webcompat:risk-high
No longer depends on: 1837276
See Also: → 1837276
Depends on: 1940492
Depends on: 1940757
Depends on: 1940758
Depends on: 1940760
Depends on: 1940762
Depends on: 1942272
Depends on: 1942286
Depends on: 1942778
Depends on: 1944310
Depends on: 1945143
Depends on: 1945789
Depends on: 1945814
Depends on: 1947165
Depends on: 1947152
Depends on: 1943764
Depends on: 1944856
Depends on: 1950058
Depends on: 1950069
Depends on: 1950318
You need to log in before you can comment on or make changes to this bug.