Start learning 50% faster. Sign in now
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 marks of 50 students in an examination was 65. It was later found that the marks of one student had been wrongly entered as 83 instead of 38...
The average of n numbers is 65. If each of 54% of the numbers is increased by 15 and each of the remaining numbers is decreased by 10, then the new aver...
The average cost of 4 chairs is Rs. 11000. The average cost decrease by 15% when one more chair is included. What is the cost price of the 5th
The ratio of the number of cats to sheep on a farm is 5:8. The total number of cats and sheep is 91. The combined weight of all t...
The average of 30 numbers was initially calculated as 45. However, it was later found that one of the numbers had been incorrectly recorded as 83 instea...
The average weight of three men is increased by 5 kg when one of them, whose weight is 100 kg is replaced by another man. What is the weight of the new ...