Thursday, May 9, 2024
 Popular · Latest · Hot · Upcoming
44
rated 0 times [  47] [ 3]  / answers: 1 / hits: 111873  / 16 Years ago, wed, march 11, 2009, 12:00:00

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?


More From » ajax

 Answers
1

The full list of readyState values is:



State  Description
0 The request is not initialized
1 The request has been set up
2 The request has been sent
3 The request is in process
4 The request is complete


(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 responseText when readyState==3, but this isn't universally supported and shouldn't be relied upon.


[#99868] Tuesday, March 3, 2009, 16 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
estefanib

Total Points: 508
Total Questions: 104
Total Answers: 83

Location: Lebanon
Member since Sun, Aug 2, 2020
4 Years ago
;