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

Clear service worker's persistent storages in a receiving browsing context #318

Closed
anssiko opened this issue Jun 14, 2016 · 3 comments
Closed

Comments

@anssiko
Copy link
Member

anssiko commented Jun 14, 2016

[This issue is spun off from #275.]

Need to specify how the service worker’s persistent storages are cleared in the receiving browsing context when creating and closing a receiving browsing context in accordance with the User Data Controls in Web Browsers guidelines.

@tomoyukilabs
Copy link
Contributor

I'd like to show a rough proposal like below:

When creating a receiving browsing context,

  • create a new empty list of registered service worker registrations for the receiving browsing context. (This corresponds to "scope to registration map" and "script resource map".)
  • create a new empty caches for the receiving context. (This corresponds to "request to response map" and "name to cache map".)

When the receiving browsing context is alive, (for the purpose of ensuring interoperable behavior for 1-UA and 2-UA cases)

  • window and worker clients in the receiving browsing context must not be exposed to service workers (via self.clients) registered in the other browsing context.
  • window and worker clients in the other browsing context than receiving browsing context must not be exposed to service workers registered in the receiving browsing context.

When closing the receiving browsing context,

  • service workers registered in the receiving browsing context must be unregistered. (Note: Do the service workers have to be terminated immediately? Service Workers spec says service workers remain effective until they are unloaded.)
  • any associated browsing state, including a list of registered service worker registrations and caches, must be discarded.

Is there any other thing to be specified?

@anssiko
Copy link
Member Author

anssiko commented Jun 27, 2016

Thanks @tomoyukilabs! Could you perhaps craft a PR to help integrate this to the spec? We can iterate it further using PR comments as needed (instructions in the wiki).

Alternatively, @mfoltzgoogle as the editor can probably help with the PR too.

@tomoyukilabs
Copy link
Contributor

@anssiko Thank you so much for instructions! I will prepare a PR.

mfoltzgoogle added a commit that referenced this issue Jul 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants