Do Web Workers Increase (or Decrease) Security?

1.2k Views Asked by At

Do web workers alleviate or intensify any of JavaScript's and the Browser Environment's known security issues?

1

There are 1 best solutions below

1
On

According to the Mozilla Web Workers Security Review:

  • Workers execute in a tightly controlled sandbox.
  • No access to Components or other global JS components.
  • Only basic JS (Math, Date, etc.), timeouts, XHR, and importScripts.
  • Script loading is subject to the same restrictions as on the main thread (content policies, same origin restrictions, etc.).
  • XHR uses the same code as the main thread.

These answered all the security considerations I had.