If I am correct, "A" in "AJAX" means sending a HTTP request asynchronously without waiting for a HTTP response.
I learn that we can send an asynchronous HTTP request by XMLHttpRequest, for example:
function handleButtonPress(e) { var httpRequest = new XMLHttpRequest(); httpRequest.onreadystatechange = handleResponse; httpRequest.open("GET", e.target.innerHTML + ".html"); httpRequest.send(); } How can we send a HTTP request synchronously?
falseas the 3rd parameter to open, but a big warning, if you use this feature not inside a WebWorker it might stop working in the future.