- From: Jake Archibald <notifications@github.com>
- Date: Fri, 28 Jun 2019 02:17:25 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 28 June 2019 09:17:47 UTC
> Even if an HTTP request is already in progress, can we not just drop the task? Like if the user agent gets the response, and the requesting task no longer exists, is that not gracefully handled? Fetch never happens as part of a task (except in the case of synchronous XHR). It happens "in parallel", which can begin within a task, but there isn't a formal link between "in parallel" and the potential parent task. > What does step 5 of [Terminate service worker](https://www.w3.org/TR/service-workers-1/#terminate-service-worker) do if there are running tasks, like fetch tasks? > > > 1. Abort the script currently running in serviceWorker. Fetches that have the service worker as their client will terminate (since the fetch group is [terminated](https://fetch.spec.whatwg.org/#concept-fetch-group-terminate). The fetch spec defines how this happens. But we don't use a client for things like service worker updates. Some algorithms already handle termination and task discarding, like https://w3c.github.io/ServiceWorker/#installation-algorithm step 11.3.1 (If task is discarded). But it's still kinda hand-wavy. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/ServiceWorker/pull/1443#issuecomment-506665817
Received on Friday, 28 June 2019 09:17:47 UTC