Today we will be talking about something that many of you have already used knowing it or not; Asynchronous JavaScript and XML or AJAX. Now a days AJAX is not necessarily the best name for this set of web techniques as XML is not nearly as popular as it used to be. You might have picked up on it in that last sentence, but a lot of people think AJAX is a library, framework or some piece of technology but all AJAX is an approach or technique to build websites, its simple as that just a different way of structuring apps.
AJAX came about like many other techniques we use today in web development in the early 2000s, when we knew for the most part to make a “modern” website or web application at the time we needed to use five things: HTML, the DOM, JavaScript, CSS, and XMLHTTP requests ( a API that allows you to make HTTP request from the browser using JavaScript). AJAX wasn’t something that was necessarily explicitly developed by one person, team or even company, it was simple an evolution of extremely skilled developers coming up with techniques collaboratively or independently that gradually formed AJAX. The whole key or main goal of AJAX was using existing technologies to create applications that can update and change content dynamically without refreshing the page. So, simply put before AJAX for the most part website could not send or receive request data in the background without disturbing the current page and this led to the popular term today single page web applications. The idea of AJAX is so commonplace today most websites and phone apps you use implement it in some form or another but before these ideas arose, many websites did not use it as it was difficult to implement.
I’m sure many of you remember older sites and how clunky they would feel and how many times the page would need to refresh, now if you use anything like Instagram or pinterest all the images and information is loaded dynamically into the page. Popular sites now a days that don’t use AJAX are something like craigslist and reddit, which yes they are both easy targets as no one has ever called either of them dynamic cutting edge websites but they are still delightful and extremely useful sites that have yet to be dethroned for many uses. You will notice when you use both these sites you have to deliberately click next page to load the next page this is the request getting sent and the page is refreshing.
The important take away from AJAX is that it is an idea, that the workflow for a website such be able to make back and forth request to the server without disrupting the running page. There are many ways to do this the old school being where AJAX got its name XML HTTP or JSON HTTP requests which has the benefit of being absolutely implemented across all browsers then we have newer approaches like fetch and third-party libraries like JQuery and Axios. I hope this brief overview was helpful thanks for reading.
Sources: