Saturday, February 9, 2013

HTML5 WEB Workers Part 1

Javascript is designed to run in single Thread environment.

Javascript does not support Multi Threading. Javascript is single threaded and this is major hindrance in implementing some cool capabilities in applications.There are other workarounds used by developers but they dont provide the flexibility which is now available with introduction of WEB Workers in HTML5.


WEB Workers are perfect for keeping your UI refresh, performant and responsive for users.

Types of WEB Workers
  • Dedicated Workers
  • Shared Workers
Note: Only Dedicated Workers are discussed in this article

WEB Worker and DOM

Since WEB worker are external files they don't have access to following Javascript objects.
  • The window object
  • The document object
  • The parent object

Continued Part 2

No comments: