AJAX is commonly used in many web applications. It is useful as it allows the user to load as much data as they need for the moment, then load extra data later using AJAX. This prevents users from using extra internet when they don't need it. This is the function of the Facebook and Google Images 'Load More' buttons.
See the below links for learning about AJAX:
To load a file with AJAX:
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhttp.status == 200) {
//add code for if the AJAX call succeeds
}
};
xhttp.open("GET", "url", true);//find the file
xhttp.send();//execute the request