What is difference between xhr.status and xhr.readyState?

by kamryn.gulgowski , in category: Technology , 4 years ago

What is difference between xhr.status and xhr.readyState?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by graciela.bogisich , 4 years ago
  • xhr.status: used to determine whether the request was successful or not.
  • xhr.readyState: the state of the request'
  • xhr.readyState zero(0) means "has not yet been sent"
  • xhr.readyState zero(4) means "complete and response received"

The server provides the status, while the user agent provides the readyState.

Related Threads:

What is the difference between DISTINCT and GROUP BY?
What is the difference between class and an object?
What is difference between InnoDB and MyISAM?
Explain the difference between HTTP and HTTPS.
What is the basic difference between overloading and overriding?
Explain the difference between HTML, CSS, and JavaScript.