AJAX Introduction
AJAX Introduction
AJAX is a technology that can update parts of a webpage without reloading the entire page.
AJAX exchanges data with the server in the background and can update parts of the webpage content.
Basic Knowledge You Should Have
Before continuing to learn, you need to have a basic understanding of the following knowledge:
- HTML / XHTML
- CSS
- JavaScript / DOM
If you want to learn these projects first, please visit these tutorials at Home.
What is AJAX?
AJAX = Asynchronous JavaScript and XML.
AJAX is a technology used to create fast dynamic web pages.
By exchanging a small amount of data with the server in the background, AJAX can enable asynchronous updates on a web page. This means that a part of the web page can be updated without reloading the entire page.
Traditional web pages (without using AJAX) must reload the entire page if content needs to be updated.
There are many application examples that use AJAX: Weibo, Taobao, Zhihu, etc.
How AJAX works
- Event triggering(such as clicking a button or page loading).
- AJAX request: Create an object using JavaScript
XMLHttpRequestand send a request to the server. - The server processes the requestThe server (usually using PHP, Node.js, etc.) receives requests, processes them, and returns response data (JSON, XML, HTML, etc.).
- AJAX response handlingThe browser receives the response and uses JavaScript to update the content on the page without reloading the entire page.

AJAX is based on existing Internet standards.
AJAX is based on existing Internet standards and uses them in combination:
- XMLHttpRequest object (asynchronous data exchange with the server)
- JavaScript/DOM (display/interaction of information)
- CSS (styling the data)
- XML (as a data format for conversion)
AJAX applications are browser and platform independent!
Google Suggest
In 2005, Google popularized AJAX with Google Suggest.
Google Suggest used AJAX to create a highly dynamic web interface: when you type keywords into the Google search box, JavaScript sends these characters to the server, and then the server returns a list of search suggestions.
Start using AJAX today
AJAX is based on existing standards. These standards have been used by most developers for many years.
Read the next chapter to see how AJAX works!