Closed Bug 1253031 Opened 8 years ago Closed 7 years ago

Impossible to clear data cached by Service Workers through any exposed UI.

Categories

(Firefox :: General, defect)

defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 1047098
Tracking Status
firefox47 --- affected

People

(Reporter: callahad, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: DevAdvocacy, privacy, Whiteboard: [DevRel:P1])

There is no way for a user to clear data cached by a Service Worker.

This causes the following problems:

- Private user data is at risk of disclosure
- Users can not reclaim disk space from greedy workers
- Developers can not reset the browser to a pristine state

Things that don't work:

- Forget button (Bug 1252998)
- Privacy -> Clear recent history (Bug 1253009)
- Privacy -> Clear everything when Firefox closes (Bug 1253027)
- Avanced -> Clear Cached Web Content (Bug 1253003)
- Advanced -> Clear Offline Web Content (Bug 1253005)
- DevTools -> "Disable Caches" (Bug 1253018)

STR:

1. Visit https://www.pokedex.org/
2. Try to find a way to clear the cached data.

You can check if the service worker is present or not by visiting about:serviceworkers.

You can check if cached data is still available by visiting https://www.pokedex.org/manifest.json and running the following JavaScript in the console:

    caches.match('/img/icon-48.png').then(x => console.log(`Resource ${(x && x.ok) ? "WAS" : "WAS NOT"} found in cache:`, x)).catch(e => console.warn("Could not open cache:", e))
Ooh! I found one way that *does* work:

1. Open the History panel
2. Right click the site and choose "Forget about this site"
Component: Untriaged → Bookmarks & History
(In reply to Dan Callahan [:callahad] from comment #1)
> Ooh! I found one way that *does* work:
> 
> 1. Open the History panel
> 2. Right click the site and choose "Forget about this site"

I think you might also achieve success by going to about:serviceworkers and clicking on the appropriate unregister button
Ah, yep, unregistering from about:serviceworkers does clear the cache once all controlled tabs are closed.
Whiteboard: [DevRel:P1]
Component: Bookmarks & History → General
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.