Reputation: 1818
If a web worker starts and then the user goes to another page or closes their browser, does the web worker still finish?
Upvotes: 4
Views: 1303
Reputation: 2300
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.
Upvotes: 3
Reputation: 22879
The web worker stops when the browser closes, since its not running on an external server.
Upvotes: 0