With Ajax(asynchronous JavaScript and XML), web applications can send data to and retrieve from a server asychronously(in the background) without interfering with the display and behavior of the existing page.
Prevents JS from making requests across domain boundaries. An origin is defined as a combination of URI scheme, hostname and port number. This policy prevents a malicious script on one page from obtaining access to sensitive data on another web page.
Cross-Origin Resource Sharing is an HTTP-header based mechanism that allows a server to indicate any origins other than its own from which a browser should permit loading resources. CORS also relies on a mechanism by which browsers make a preflight request to the serber hosting the cross-origin resource, in order to check that the serve will permit the actual request. In that preflight, the browser sends headers that indicate the HTTP method and headers that will be used in the actual request.