Chad
Chad

Reputation: 1818

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

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

Answers (2)

Jim
Jim

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

Philip Kirkbride
Philip Kirkbride

Reputation: 22879

The web worker stops when the browser closes, since its not running on an external server.


Similar question

Upvotes: 0

Related Questions