readyState
statusText
onreadystatechange
window.status
what's the diff from 'state' to 'status' in english?
readyState
statusText
onreadystatechange
window.status
what's the diff from 'state' to 'status' in english?
Not much. I would tend to say state refers to more detailed information, but that's subjective.
For these:
XMLHttpRequest.readyState - one of 5 possible states for a request
XMLHttpRequest.statusText - The text equivalent of the HTTP response status (e.g. "200 OK")
XMLHttpRequest.onreadystatechange - function to call when readyState changes
window.status - status bar text (typically bottom left of window)
status in window.status points to the status bar of the browser. In pure English though, i don't see much difference between state and status.
They are quite similar, as they both signify the current properties of something. There is however a bit of a difference in how they are used:
A state is usually a single propery with some specific possible values. The readyState for example will cycle through some specific predefined values when a page loads.
The status is usually a collection of properties, or a description of them. The window.status property for example is just the text that is displayed in the status bar, and that can descibe any aspect of the content.
Just a humble tought: It could help thinking to readyState in a finite state machine fashion. I mean, when a page loads, It goes from a state to another (and not from a status to another status). Maybe this explain why they have decided to call It state.