Embed presentation
Download to read offline













Web workers allow JavaScript to run in background threads to optimize performance. A worker runs in a separate global context and can communicate with the main thread via messaging. A shared worker can serve multiple browsing contexts and uses ports to send and receive messages between contexts. Workers parallelize work to speed up tasks while shared workers facilitate sharing state across contexts by using a single worker instance.











