what is xhr
XMLHttpRequest or XHR is a javascript API used for communication between the client and the server. it is mainly used by web pages to send and receive data after the page has been loaded. Contrary to its name, XHR can be used to recieve JSON, HTML and plain text as well as XML. XHR is used as part of the AJAX (Asynchronous Javascript and XML) technique. AJAX utilizes XHR to load data asynchronously from the server in the background without disturbing the behavior of the web page. It is used in many of the dynamic websites that you see today.