I am working on a project that uses a web worker. In my head section I have this code: var worker = new Worker("worker.js"); // More code This works fine in Safari, but Chrome reports the following error: Uncaught SecurityError: Failed to create a worker: script at '(path)/worker.js' cannot be accessed from origin 'null'. Why does this work perfectly in Safari but not Chrome? How do I fix this? Th
![Chrome can't load web worker](https://cdn-ak-scissors.b.st-hatena.com/image/square/98d6f053a97a87156775f60757c60865d0f2c47d/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fstackoverflow%2FImg%2Fapple-touch-icon%402.png%3Fv%3D73d79a89bded)