
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
Stop Web Workers in HTML5
Web Workers allow for long-running scripts that are not interrupted by scripts that respond to clicks or other user interactions and allows long tasks to be executed without yielding to keep the page responsive.
Web Workers don't stop by themselves but the page that started them can stop them by calling terminate() method.
worker.terminate();
A terminated Web Worker will no longer respond to messages or perform any additional computations. You cannot restart a worker; instead, you can create a new worker using the same URL.
- Related Articles
- Why HTML5 Web Workers are useful?
- How can I use Web Workers in HTML5?
- How to handle errors in HTML5 Web Workers?
- Log error to console with Web Workers in HTML5
- HTML5 audio control stop button
- Html5 responsiveness of the web
- How to check web browser support in HTML5
- What is meant by HTML5 Web Messaging?
- Using HTML5 Server-Sent Events in a web application
- How do we embed audio in web pages in HTML5?
- Use of Ionic as desktop web application with HTML5
- How to allow the restricted resources from another domain in web browser with HTML5
- Unorganized Workers & Labour Laws
- Does HTML5 allow you to interact with local client files from within a web browser?
- Minimum Cost to Hire K Workers in C++

Advertisements