Chapter 2. Getting Started

In this chapter

2.1 XMLHttpRequest Overview

2.2 Cross-Browser XMLHttpRequest

2.3 Sending Asynchronous Requests

2.4 AJAX Without XMLHttpRequest

2.5 Fallback Option 1: Sending a Request Using an IFrame

2.6 Fallback Option 2: Sending a Request Using a Cookie

2.7 Summary

The foundation that makes AJAX possible is the communication layer with the server. The most complete option for performing this communication is the JavaScript XMLHttpRequest object. If XMLHttpRequest is not suitable to you, hidden IFrames and cookies can also be used. We will examine both options later in this chapter.

This chapter introduces you to the XMLHttpRequest object, showing you how to work around its implementation differences ...

Get Understanding AJAX: Using JavaScript to Create Rich Internet Applications 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.