Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8523715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:29:17+00:00 2026-06-11T07:29:17+00:00

I have a script at http://localhost/js/foo.js which needs to spawn a Web Worker from

  • 0

I have a script at http://localhost/js/foo.js which needs to spawn a Web Worker from the file http://localhost/js/fooWorker.js. I assumed I could just do something like this:

var worker = new Worker('fooWorker.js')

However, this results in a 404 error, as the browser cannot find http://localhost/fooWorker.js. I was under the impression that worker paths were resolved relative to the script spawning the worker, so shouldn’t I just be able to specify the name of another .js file in the same directory without having to provide an absolute path? Am I doing something wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:29:19+00:00Added an answer on June 11, 2026 at 7:29 am

    From http://www.w3.org/TR/workers/:

    When the Worker(scriptURL) constructor is invoked, the user agent must
    run the following steps:

    1. Resolve the scriptURL argument relative to the entry script’s base
      URL, when the method is invoked.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following URL: http://localhost/mysite.loc/web/app_dev.php/blah/blah/blah I need to calculate the root URL to
Using C# & Java Script I have the link like this http://localhost/Server/Vehicle/Vehicle.aspx?appid=5 , when
I have a Perl script which is scripted to print Hello! on a web
I have this script http://jsfiddle.net/gphp/ZMmRv/4/ I have two events: 1 - the div is
I have been transferring this script (http://jsfiddle.net/darkajax/FHZBy/) in to my live environment within a
I have a custom accordion script - http://jsfiddle.net/nJpNb/2/ What I want to be able
OK I have a simple script at http://kleague.org/test/ Type a movie name and it
THIS IS THE FULL SCRIPT http://goo.gl/HoCxk I have a problem with this function: $('.message').click(function(){
I have that script: // ==UserScript== // @name example // @include http://xxx* // @require
I have Ruby script that creates a proxy so that I can make HTTP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.