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

  • SEARCH
  • Home
  • 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 8139055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:41:59+00:00 2026-06-06T11:41:59+00:00

My HTML5 application uses web workers to analyze an image’s pixel data from a

  • 0

My HTML5 application uses web workers to analyze an image’s pixel data from a canvas context. Once the worker has analyzed the data, it makes 3 XHR calls back to my server to update my model. When I was testing the application, I was able to start and run as may workers as I tried, and each worker only made one XHR call back to the server. Everything worked fine.

Now that I attempt to make three async calls from a single worker, I get problems. Looking at Chrome’s developer tools, I can see that all 3 calls get fired, but they all get cancelled, except for the last one. This happens if I make any or all of the calls async or not. However, if I use a timer (setTimeout) to fire each call about 500 milliseconds apart from each other, they all work fine.

Any ideas?

In short, my questions are:

1. How many ajax calls can be make at the same time inside a worker?

2. Why did ajax calls get cancelled inside my worker? (solved)

3. Slightly unrelated to my problem at hand, but what is the max number of workers you can start in a single page? Should I stop a worker once I know I won’t be sending it any messages?

Thanks

Update: Turns out I solved the problem I was having with async calls getting canceled. The problem was that I had created my own simple ajax class to use inside the worker, and instead of instantiating it for each call, I was using the same instance of this object. So when I made subsequent calls through it after an earlier call had been made, the first call would get cancelled if it hadn’t returned before the new call was made. Hope that makes sense.

  • 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-06T11:42:00+00:00Added an answer on June 6, 2026 at 11:42 am

    I have tried with 6 diff ajax calls with no setTimeouts, it works fine for me.

    Do you still get the same error in the latest chrome/safari browser?

    Could be a server behavior. Also, did you try without web worker?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a web application using HTML5 canvas to draw images ( like
I have a web application that uses HTML5, javascript, and jquery to send messages
We have an ASP.NET web application which uses ASP.NET Ajax. We open it from
I'm currently writing a web application which uses forms and PHP $_POST data (so
I'm building a rich web application that uses a lot of data. When I'm
I am developing a flex charting web application which gets data from csv files.
So I'm working on a web application that uses jquery to parse xml data
I'm planning to do a C++ standalone desktop application which uses web / html
I have a web based application that uses a self signed certificate. When you
I'm working on a web application that uses ASP.NET 3.5 and C#. Structurally, I

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.