Categorize Numbers Mobile Web APP - Web Workers API

Info

Inputs|Actions

                  

Message Area

Outputs

                   

What is a Web Worker?

A Web Worker is a JavaScript code running in the background, without affecting the performance of the page.

When executing scripts in an HTML page, the page becomes unresponsive until the script is finished. A web worker is a JavaScript that runs in the background, independently of other scripts, without affecting the performance of the page. You can continue to do whatever you want: clicking, selecting things, etc., while the web worker runs in the background. [Source]

A Web Worker, is a JavaScript script executed from an HTML page that runs in the background, independently of other user-interface scripts that may also have been executed from the same HTML page. Web Workers are long-running scripts that are not interrupted by user-interface scripts (scripts that respond to clicks or other user interactions). Keeping such workers from being interrupted by user activities should allow Web pages to remain responsive at the same time as they are running long tasks in the background. [Source]

Categorize Numbers

About this Mobile Web App

This Mobile Web APP was developed using the jQuery Mobile framework and the HTML5 Web Workers API to perform a computationally expensive task without interrupting the user interface.

In this App, the user input a range of numbers (integers) by specifying the Lower and Upper values, then the Web Worker API outputs back to the GUI all valid prime, even, odd and divisible by 3 numbers for the range specified.

The Web Worker API is useful in situations when there is a long running task to perform and you really don't want to do that on the main user interface thread. Instead, you can start a Web Worker, and in the background, the task is running while the main user interface remains responsive.

Definitions: