Http status codes are supported by Internet Assigned Numbers Authority (IANA), while readyState refers to XmlHttpRequest .
So just go to an authoritative source. Wikipedia article should be sufficient, as this is not a very controversial topic - or, as commented, the official list can be found here
You can also wrap the ones you are interested in in a javascript object
var HttpCodes = { success : 200, notFound : 404
maybe if(response == HttpCodes.success){...}
Jamiec
source share