DEV Community

gyi2521
gyi2521

Posted on

15 6

What is Ajax?

What is Ajax?

When the instructor asked "What is Ajax" in my coding boot-camp class, someone immediately answered, "A cleaning solution!". We all laughed but that's how people will answer outside the computer world. So, what is Ajax in the computer world?

AJAX stands for Asynchronous JavaScript and XML. It is a web development technique for creating interactive web applications. AJAX allows web pages to be updated asynchronously by exchanging data with a web server behind the scenes. This means that it is possible to update parts of a web page without reloading the whole page.

A great example would be the Google suggestion list you see in the Google search box. When you start typing something in the Google search box, the list in that drop-down box changes. The content on the page dynamically changes without refreshing the page. How cool!

alt text

So how does Ajax actually works? I got the following diagram and steps from w3schools.

alt text

How AJAX Works

  1. An event occurs in a web page (the page is loaded, a button is clicked)
  2. An HTTP Request object is created by JavaScript
  3. The HTTP Request object sends a request to a web server
  4. The server processes the request
  5. The server sends a response back to the web page
  6. The response is read by JavaScript
  7. Proper action (like page update) is performed by JavaScript

I will explain how to create, add, update, and delete in my next blog, so stay tuned.

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay