java - What is exactly is Ajax request? Is it different from Servlet Request? -


Can anyone tell me what the Ajax request really is? Is this sublett different from the request?

An Ajax call is an indefinable request that resulted in a direct page transition launched by the browser. The request is a java-services term (servlet is a java specification), which is to serve an HTTP request, which can get a simple GET or POST (etc) or an Ajax request.

An Ajax ("asynchronous JavaScript and XML") request is sometimes called an XHR request ("XmlHttpRequest"), the name of the object used to send an Ajax request to most browsers Because at least initially Ajax is involved in sending and receiving calls, but now it is just fine as it is common to send / receive JSON, plain text or HTML.

A good example of Ajax request is the comment system on the Stackworflowflow, you can enter a comment in the text box and click submit. It does not store the entire page (like a traditional HTML form is stored, which is usually translated into a post, but sometimes a GET HTTP request). Instead the browser will probably send a POST request via XHR to the server and will be notified about the response (hence "asynchronous"). But the server can not usually distinguish between an Ajax request or page transition because they only come in HTTP requests.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -