- From: ppppess <notifications@github.com>
- Date: Mon, 07 Mar 2016 09:00:32 -0800
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Monday, 7 March 2016 17:01:14 UTC
Hi @wanderview. Sure, I guess I could hack it, but it is not as clean as being able to determin reliably which "authority" (i.e. page) controls the service worker. Basically, no clientID makes it really hard for different pages to share the same service worker. You could imagine for example (silly, I know) 2 pages with the same url (referrer) opened at the same time, on the first one the user gives InstructionX, on the other InstructionY. With clientID, this is easy: postMessage InstructionX, service worker keeps clientID->InstructionX, and then applies InstructionX to all requests from clientID. Without clientID, you would have to do ugly hacks to work around the problem. Just my 2cts. Plus it really seems logical. Or maybe I am missing something, I did not play enough with it yet. Great technology, btw. --- Reply to this email directly or view it on GitHub: https://github.com/slightlyoff/ServiceWorker/issues/808#issuecomment-193345073
Received on Monday, 7 March 2016 17:01:14 UTC