SplitCache: Get TopFrameOrigin for shared & service workers |
||
Issue descriptionWe want to prevent worker clients with different top-frame origins from being able to share the net stack's disk cache entries. A desirable solution is to isolate worker contexts based on the top-frame origin. In other words, a shared worker created on page a.com is isolated from (a separate instance) to a shared worker created on b.com with an iframe of a.com. An alternative solution is to simply not cache requests from shared workers.
,
Jan 3
What I proposed above is to change the spec for shared workers and service workers such that all of a worker's clients must have the same top-frame origin. If they have different origins, then a new worker instance is created. I don't know how feasible that really is or how much it might break sites (or developer minds). It's just a thought. If we were to do that, then we'd need to prevent communication with other workers w/ different top frame origins. Which means postMessage, broadcastChannel, indexeddb, cacheStorage, localStorage, etc. I agree. Which is why I posited the simpler solution, which is to simply prevent disk caching for shared workers, at least for experimentation purposes. If we decide down the road that full isolation would be beneficial then we could look at that.
,
Jan 17
(6 days ago)
|
||
►
Sign in to add a comment |
||
Comment 1 by wanderview@chromium.org
, Jan 3