[w3c/ServiceWorker] The Cache objects do not expire unless authors *or users* delete the entries. (#1276)

https://w3c.github.io/ServiceWorker/#cache-lifetimes says:

> The Cache objects do not expire unless authors delete the entries.

I propose to extend this to allow the possibility of the user deleting caches and individual cache entries. While I don't think this is likely to be common, it does mean the cache storage mechanism has weaker overall consistency guarantees than are otherwise implied:

> The Cache objects do not expire unless authors *or users* delete the entries.

This might be understood to mean that developers can rely on end-users not being able to modify cache contents — at least, not without running code using the developer tools or an equivalent mechanism. However, at least in Chrome, caches can also be manually removed by the user (for instance, to reduce exposure to privacy risks or to reclaim storage space) without necessarily stopping the origin's Service Workers or removing the origin's Service Workers or other storage.

For instance, using:

 Settings > Advanced > Privacy & Security > Content settings > Cookies > See all cookies and site data > [hostname] > Cache Storage > X

... the user can remove all caches for an origin. Those caches are also removable using the developer tools, but given the intended audience I think it's less clear that that disagrees with the wording of the spec. That part is in:

 Developer Tools > Application > Clear storage > [uncheck all but "Cache storage"], Clear site data

The developer tools also allow an individual cache or cache entry to be selected and deleted using the "Cache" tree in the side-navigation area.

+@inexorabletash


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1276

Received on Saturday, 3 February 2018 00:34:44 UTC