AJAX is a methodology which allows us to communicate between the client and the server through our JavaScript code. We can request information via HTTP from the server using a GET request or send data to the server using a POST request.
Method | a.k.a. | Description |
---|---|---|
GET | READ | Requests data. This can be tested in the browser. |
We'll be adding more request types at a later point.
We can call routes from the client side with AJAX!
jQuery has a method called $.ajax()
(http://api.jquery.com/jquery.ajax/) which makes creating and controlling these requests easier. Remember, we can make these requests with vanilla JavaScript (see XMLHttpRequest). jQuery just makes it easier.