Summary
In this chapter we created an application to draw Mandelbrot fractals to learn how to use HTML web workers to execute long running processes in a background thread. This allowed the browser to remain responsive and accept user input while generating the image.
We covered the following concepts in this chapter:
- How to use web workers to make web applications more responsive
- How to create a web worker and start it
- How to send messages and data between the main thread and the web worker
- How to draw a Mandelbrot using a web worker
- How to catch errors thrown from a web worker
- How to debug web workers
In the next and final chapter we will learn how to prepare a web application for release by combining and compressing its JavaScript files. This will give the application a lighter network footprint. In addition we will see how to use the HTML5 Application Cache to cache an application so it will run even when the user is offline.