Skip to main content
100%

Gist 164984

✓ Published0🌍 Public
XXXX
Last edited Aug 10, 2009
Created on Aug 10, 2009

This example demonstrates an error that occurs when a Web Worker attempts to make a cross-origin XMLHttpRequest to `http://www.google.com/` from a local file. The page spawns a worker via `new Worker('my_worker.js')`, which sends a GET request and tries to post the response status back to the main thread. However, the worker’s `XMLHttpRequest.open` call throws a security exception (`0x805e000a`), highlighting the restriction that workers cannot access external URLs without proper CORS headers, even when the worker itself is loaded locally.

AI-generated description

Similar vizzes