Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Storage.clearDataForOrigin for clearing storage & SW #592

Closed
paullewis opened this issue Aug 16, 2016 · 2 comments
Closed

Migrate to Storage.clearDataForOrigin for clearing storage & SW #592

paullewis opened this issue Aug 16, 2016 · 2 comments
Assignees

Comments

@paullewis
Copy link
Contributor

Do we want to clear storage before we gather against a URL for the first time? Feels destructive (esp for the extension!), but we already clear SWs and force them to reinstall, and I'm figuring we could get skewed data if stuff already exists in LS, IDB, Caches etc.

Perhaps a config option to clear data before run? wdyt?

@paulirish
Copy link
Member

paulirish commented Aug 17, 2016

but we already clear SWs and force them to reinstall

We don't currently clear SW's (but will when #598 lands).

But yeah I'm in favor of wiping the origin.

Good spot on Storage.clearDataForOrigin.. Didn't know it was so straightforward. :)

@paulirish
Copy link
Member

First, cross-ref of the findings in #598 (comment)

We can kill our SW forceUpdateOnLoad and browser cache clearing and replace with clearDataForOrigin()

A call looks like this:

 {"id":80,"method":"Storage.clearDataForOrigin","params":{"origin":"https://pwa.rocks","storageTypes":"appcache,cache_storage,cookies,indexeddb,local_storage,service_workers,websql"}}

@paulirish paulirish changed the title Clear storage prior to gathering? Migrate to Storage.clearDataForOrigin for clearing storage & SW Aug 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants