W3C home > Mailing lists > Public > public-secondscreen@w3.org > June 2016

Re: [presentation-api] Clear service worker's persistent storages in a receiving browsing context

From: Tomoyuki Shimizu via GitHub <sysbot+gh@w3.org>
Date: Fri, 24 Jun 2016 09:17:30 +0000
To: public-secondscreen@w3.org
Message-ID: <issue_comment.created-228297869-1466759849-sysbot+gh@w3.org>
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](https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-registration-lifetime)
 for the receiving browsing context. (This corresponds to "scope to 
registration map" and "script resource map".)
* create a new empty 
[caches](https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#cache-objects)
 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](https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#service-worker-client-concept)
 in the receiving browsing context must not be exposed to service 
workers (via 
[`self.clients`](https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#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](https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#navigator-service-worker-unregister)
 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?

-- 
GitHub Notification of comment by tomoyukilabs
Please view or discuss this issue at 
https://github.com/w3c/presentation-api/issues/318#issuecomment-228297869
 using your GitHub account
Received on Friday, 24 June 2016 09:17:32 UTC

This archive was generated by hypermail 2.3.1 : Friday, 24 June 2016 09:17:32 UTC