-
Notifications
You must be signed in to change notification settings - Fork 314
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
Should DedicatedWorkers select their own ServiceWorkerRegistration? #423
Comments
I thought this was decided long ago? DedicatedWorkers probably should not. In the context of ApplicationCaches, shared workers are viewed as a distinct top-level-browsing-context and dedicated workers are not. Dedicated workers are completely encapsulated by their owner. The ower makes resource loads on behalf of its dedicated workers. The Web Workers spec describes this more plainly... "For the purposes of the application cache networking model, a dedicated worker is an extension of the cache host from which it was created." I don't think there's compelling reason to deviate from that model. |
The reason would that they have a distinct global, have their own CSP, etc. |
Has it been decided to consider dedicated worker a service worker client? |
Yeah, there's no reason to treat them differently from other workers. Not sure why AppCache was weird about it. |
Because a dedicated worker does not define it's own browsing context, they inherit their parents browsing context. Is there compelling reason for this to different compared to how its handled in appcache, otherwise it seems like an arbitrary difference? Fyi, Chromium's current implementation treats the dedicated worker resource and any resources loaded by a dedicated worker similar to a subresource loaded by the main document. Altering that behavior would probably be a large task. |
No type of worker defines a browsing context. What's important is that all workers and windows define an environment, have their own referrer, their own CSP, etc. That AppCache special cased dedicated workers was a mistake. |
Why do you say it was a mistake? |
Because in every other aspect they are on equal footing. I suspect they were special cased because AppCache did not have a story for workers, whereas we do. |
Yeah, DedicatedWorkers should select their own ServiceWorkerRegistration, and therefore be SW clients. |
We need to define which things are ServiceWorker clients, meaning they independently select a ServiceWorkerRegistration to use for their own loading and their subresources.
A SharedWorker should, I don't think anyone disagrees there, but DedicatedWorkers?
The text was updated successfully, but these errors were encountered: