Join Bill Weinman for an in-depth discussion in this video Reviewing the application, part of HTML5: Background Processes with Web Workers.
- View Offline
For the remainder of this chapter we will be using this simple worker…application to demonstrate some common techniques for using web workers.…This is a little bit more complicated than the example we showed in the last chapter.…The way this one works is you type in a number, let's say 25, which we know is…not a prime number, and I click on this button that says Find First Prime.…It says "The first prime>25 is 29."…29 is a prime number.…If I were to take 29 in here, we would find the first prime after that, which is 31.…
What if I type in 1234? It will find some other number, 1237.…So it's simple in how it works. Let's take a look at the code.…This is the HTML file, workerFindPrime-done.html from your Chap02 folder in…your exercise files.…First I am just going to scroll through it for those of you who are typing it in.…
- Deploying a worker
- Detecting browser support
- Communicating with workers
- Understanding API differences in shared workers