Making your first AJAX call

Now that we have an active JSON data feed, it is about time to make our first AJAX call. We will look at two approaches of making an AJAX call; these approaches come from different periods in time. The first approach will use basic JavaScript so that we understand what happens behind the scenes when an AJAX call is made. Once we understand the concept of AJAX, we will use a popular JavaScript library to make the same AJAX call but with simpler code. Let's take a look at our first approach using basic JavaScript:

Making your first AJAX call

We will begin with our basic index.html file that loads an external JavaScript file. This JavaScript file performs ...

Get JavaScript and JSON Essentials 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.