Chapter 9. Web Workers Unite
"If you want creative workers, give them enough time to play."
In this chapter we will learn how to use HTML5 web workers to run background processes in another thread. We can use this to make applications with long running processes more responsive. We will draw a Mandelbrot fractal on a canvas using a web worker to generate it asynchronously without locking up the browser window.
We will learn the following topics in this chapter:
- How to make web applications more responsive by using web workers
- How to start and manage a web worker
- How to communicate with a web worker and send data back and forth
- How to draw a Mandelbrot fractal on a canvas using a web worker
- Tips for debugging web workers