Chapter 17. A JavaScript Library for Ajax

In this lesson you will learn how to encapsulate some of the techniques studied up to now into a small JavaScript library that you can call from your applications.

An Ajax Library

Through the lessons and code examples up to now, we have developed a number of JavaScript code techniques for implementing the various parts of an Ajax application. Among these methods are:

  • A method for generating an instance of the XMLHTTPRequest object, which works across the range of currently popular browsers

  • Routines for building and sending GET and POST requests via the XMLHTTPRequest object

  • Techniques for avoiding unwanted caching of GET requests

  • A style of callback function that checks for correct completion of the XMLHTTPRequest ...

Get SAMS Teach Yourself Ajax in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.