XMLHttpRequest has 5 readyStates, and I only use 1 of them (the last one, 4).
What are the others for, and what practical applications can I use them in?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
The full list of
readyStatevalues is:(from https://www.w3schools.com/js/js_ajax_http_response.asp)
In practice you almost never use any of them except for 4.
Some XMLHttpRequest implementations may let you see partially received responses in
responseTextwhenreadyState==3, but this isn’t universally supported and shouldn’t be relied upon.