XMLHttpRequest Properties


XMLHttpRequest properties are used to get information about the request.

They tell us the current status, response data, and state of communication between browser and server.

The readyState property shows the current stage of the AJAX request.

It changes automatically as the request progresses.

The status property contains the HTTP response code returned by the server.

It helps determine whether the request was successful or failed.

The responseText property stores the response sent by the server in text format.

The responseXML property is used when the server returns XML data.

These properties are mostly accessed after the server sends a response.

By checking these properties, developers can control how data is handled inside applications.

Understanding properties is important before learning readyState values and error handling.