Noah Freitas
Noah Freitas

Reputation: 17430

Do Web Workers Increase (or Decrease) Security?

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

Upvotes: 7

Views: 1416

Answers (1)

Stumpy7
Stumpy7

Reputation: 252

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.

Upvotes: 6

Related Questions