Re: [whatwg/storage] Add API to allow origin to purge all storage (#4)

I'm guessing this is to replace http://w3c.github.io/webappsec-clear-site-data/#dom-api?

> We could define navigator.storage.purge() which returns a promise that fulfills with undefined when done.
> What happens if you write to the box meanwhile?

The purge operation could create a new default box then mark the old one for deletion. Anything which creates a new storage connection would operate on the new box, even if the old box hasn't been fully dispatched.

No strong opinions on hook vs algorithm to call. Maybe an algorithm would make it easier to purge specific types of storage?

Happy for any pending transactions/write to reject, and any additional writes to also reject. We could do this by reading state on the box, and if it's "redundant", throw.


---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/storage/issues/4#issuecomment-203890085

Received on Thursday, 31 March 2016 11:36:29 UTC