Congratulations, you're now a professional Ajax developer! We covered plenty of things in this chapter.
Specifically, we covered:
Creating a Request object: We learned how to create an Ajax Request object in MooTools, as well as the options and methods available to us for working with Request objects.
Requesting data: We discovered how to request data from the web server. In the process we explored the
Request.HTML
andRequest.JSON
classes, which make working with HTML and JSON data a breeze.Sending data: With the help of PHP, we witnessed just how powerful Ajax is by sending data to a server-side script that processed our data and sent it back to us, asynchronously. This allowed us to create an uninterrupted user experience that instantly updated the web page upon a user event.
Setting and getting HTTP headers: We learned that HTTP requests and responses have attached meta information that tell us about the server and the data we're requesting. They're called HTTP headers and we used...