O'Reilly logo

HTML5 Web Application Development By Example Beginner's guide by J.M. Gustafson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Web Workers Unite

"If you want creative workers, give them enough time to play."

—John Cleese

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

Web workers

Web ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required