I understand that Web Workers allow running JavaScript in parallel on a web page, without blocking the user interface. I also understand that Web Workers don't have access to the DOM that means I cannot select any html element. Also, Web Workers do not have access to 'parent'.
I have two questions related to Web Workers:-
1. When will I normally use a Web Worker?
2. As per the Web Workers specification given by WHATWG,
workers are expected to be long-lived, have a high start-up performance cost, and a high per-instance memory cost.
Why will I want to use something like this on client-side and that too in parallel to another JavaScript?
I tried to understand the examples given in the specification but couldn't understand their value.