TECH

Vol.31

author

Engineer

Y.M.

Making Web Pages More Comfortable with Ajax

#WEB#webサイト#programming#開発#ブラウザ

JavaScript functionality is being implemented in web pages more and more frequently.
In this article, we’ll explain “Ajax,” a technology that is actually used in many familiar services, often without users even realizing it.

stuffstuff

What Is Ajax?

“a” … Asynchronous
“ja” … JavaScript
“x” … XML
The term “Ajax” is made from the initials of these words.
Simply put, it refers to web applications that communicate with a server without reloading or switching the page.

Ajax is implemented using JavaScript functionality.
It communicates with the server through a method called “asynchronous communication.”
A familiar example is Google Maps.
When you scroll or zoom the map on the screen, map data is loaded according to your actions.
Information is retrieved in real time based on user operations.

In fact, Ajax itself is not technically a new technology.
Google Maps, mentioned earlier, was one of the major reasons Ajax gained widespread attention.
The ability to retrieve and display information in real time using only HTML, CSS, and JavaScript—without relying on Java or Flash—was considered groundbreaking and attracted significant interest.

Today, many familiar services make use of Ajax.

stuffstuff

“Synchronous Communication” and “Asynchronous Communication”

html id="r6v2qn"

Ajax communicates with the server using asynchronous communication.
But what exactly is asynchronous communication?
Let’s compare it with its counterpart, synchronous communication.

Synchronous Communication

html id="w3k8pz"

When sending a request to the server (such as moving or zooming in Google Maps), the page switches or reloads.
Until the server responds to the request, the page cannot be displayed properly, which means the user cannot continue interacting with it.
In addition, even if the new page looks almost identical, the browser is instructed to reload the files that make up the page.
As a result, unnecessary communication with files unrelated to the request occurs, increasing the amount of data exchanged with the server.

Asynchronous Communication

When sending a request to the server, communication is performed without moving or reloading the page.
Because the entire screen is not refreshed, users can continue interacting with the page even while waiting for the server response.
Since only the necessary communication related to the request is performed, the amount of data exchanged with the server is reduced.

Ajax Uses “Asynchronous Communication”

Ajax exchanges data with the server using “asynchronous communication.”
To summarize asynchronous communication, it works as follows:

Ajax uses asynchronous communication
 
  • After sending a request, users can continue operating the page while waiting for the response, allowing them to interact without interruption.
Ajax uses asynchronous communication
 
  • Because requests are handled partially, the number of files retrieved from the server is reduced, making communication lighter and more efficient.

The key point of Ajax is that it simplifies traditional step-by-step communication processes and retrieves data in real time, enabling web applications to behave almost like a live conversation.

Conclusion

In this first part, we provided a simple explanation of what Ajax is.
In the next part, we’ll introduce familiar web services that use Ajax—often without users realizing it—as well as implementation examples using jQuery.

Reference: Benefits of Using Ajax
Reference: What Exactly Is “Ajax”?

PREV
Vol.30Creating Animations with CSS3 Ke…
NEXT
Vol.32Getting Started with GitHub Desk…

MORE FOR YOU