Question
In AJAX (Asynchronous JavaScript and XML), which of the
following properties must be set to true to prevent the browser from waiting for the response before executing the next line of code?ÂSolution
In AJAX, setting the async property to true allows JavaScript code to execute without waiting for the response from the server, enabling asynchronous communication. This approach prevents the browser from "blocking" or pausing the script's execution, thus improving user experience by allowing other interactions to continue while waiting for the server's response. By default, most AJAX requests are asynchronous (async = true), making web applications more responsive and efficient. Asynchronous operations are critical for modern web development, especially in single-page applications (SPAs), where responsiveness is key. If async were set to false, the browser would behave synchronously, waiting for the server’s response before executing subsequent code, which can lead to significant delays in user experience, especially with slow network connections. Option A (method) - This property specifies the HTTP method (e.g., GET, POST) used in the request, not the asynchronous behavior. Option B (readyState) - This property holds the current state of the XMLHttpRequest but does not control whether the request is asynchronous. Option D (status) - The status property represents the HTTP status code of the server’s response (like 200 for success), not the asynchronous nature of the request. Option E (responseText) - responseText holds the data returned from the server but does not control whether the request waits for the response.
The average weight of 16 people in a group is 75 kg. If the heaviest person who weighs 95 kg is replaced by a new person, and the average weight of the ...
14, 28, 56, 112, ...... The sum of first 10 numbers in the series is:
The ratio of length and breadth of a rectangular field is 5:9. If the total cost of surrounding it at the rate of Rs 7.50 per meter is Rs 4200, then fin...
A, B and C invested in partnership. A invest Rs.9000 for 5 months, B invests Rs.7000 for 3 months and C invests Rs.12000 for 2 months. C is working part...
The mean of a distribution is 25 and the standard deviation is 5. What is the value of coefficient variation?
18, 27, 54, 135, 400, 1417.5
If the median and mode of some observations is 5 and 9, respectively, then find the mean of those observations.
The area of a square is 900 cm2 which is 120 cm2 less than that of a rectangle. Find the perimeter of the rectangle if the length ...
If a, b, c are in geometric progression and a + b + c = 14, a² + b² + c² = 84, find a, b, c.
Present average age of A, B and C together is 44 years. Age of B is 12 Years hence from now will be 260% more than age of A, Four years ago from now whi...