Do HTML5 Web Workers finish if the user leaves or closes browser?

html, web-worker

Solution

The worker will terminate once all owners have been closed. If you have a shared worker it will stay alive until all owners are closed (it could exist in another tab, for example). Closing the browser will kill all workers always.

Problem

If a web worker starts and then the user goes to another page or closes their browser, does the web worker still finish?

Original source

Related problems