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 6589155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:08:13+00:00 2026-05-25T17:08:13+00:00

I have written a JavaScript function that asynchronously calls a web service using XmlHttpRequest.

  • 0

I have written a JavaScript function that asynchronously calls a web service using XmlHttpRequest. I have been asked to make this function finish its work before the page is rendered.

I thought I could make the AJAX request synchronous but I don’t want this to make the page hang too long – I’d like to abort the request after, say, 1 second if a response isn’t received.

Is it possible to abort a synchronous XmlHttpRequest?

  • 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-05-25T17:08:14+00:00Added an answer on May 25, 2026 at 5:08 pm

    You can’t:

    http://www.hunlock.com/blogs/Snippets:_Synchronous_AJAX sais:
    “Synchronous AJAX (Really SJAX — Synchronous Javascript and XML) is modal which means that javascript will stop processing your program until a result has been obtained from the server. While the request is processing, the browser is effectively frozen. The browser treats the call like an alert box or a prompt box only it doesn’t wait for input from the user, but on input by the remote server”

    Once the browser runs the sync request, it will wait until it will get a response.

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

Sidebar

Related Questions

I have an asp.net web page written in C#. Using some javascript I popup
I have written a javascript function that uses setInterval to manipulate a string every
Scenario I have a Node.JS service (written using ExpressJS ) that accepts image uploads
I have this bit of javascript written with jQuery 1.2.5. It's contained inside the
I have to maintain a server-side script written in JScript (NOT Javascript) that needs
I have a javascript function that, in most cases, needs to do something with
I'm writing a Javascript function that would manipulate an array written on-the-fly and sent
Background: I have written a bookmarklet (JavaScript) that appends an iframe to the current
I have written this code for add cart to payment. while clicking buttons that
I have written some JavaScript code. It adds new function to NodeList type in

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.