I went through couple of articles that talk about Web Workers in HTML5 and I was not able to clearly understand the following:
Appreciate if someone could help me shed some light on the above questions.
Dedicated worker is limited to a single page, while shared worker can be related to many webpages
It could be persistent if it has onmessage() defined, and it could also returns after execution, if I understand correctly. In spec it says: let that run until it either returns, fails to catch an exception, or gets prematurely aborted by the "kill a worker" or "terminate a worker"...
It depends. You can't simply say it is better or not. At the moment Web worker is mainly used for offloading complex JavaScript algorithms to run in the background.