HTML5 web worker specification provides a standard API for spawning new background threads and enables concurrency in web apps.

Web workers execute scripts in isolated threads and do not share resources with the main UI thread. The script executed by the workers has to be in a separate file. This allows web workers to perform their tasks without interfering with a main thread and without interrupting the user interface.