badge icon

This article was automatically translated from the original Turkish version.

Article

Ajax (Programming)

Quote

AJAX (Asynchronous JavaScript and XML) is a web programming approach that enables asynchronous data exchange between the client and server through JavaScript code running on the client side. With this method, only the necessary parts of a web page are updated without reloading the entire page. AJAX is not a single technology but a suite of technologies that integrate XHTML/CSS for the presentation layer, the Document Object Model (DOM) for dynamic interaction management, data formats such as XML or JSON for data transmission, the XMLHttpRequest object for asynchronous communication, and JavaScript to coordinate all these components.

History and Emergence

The term AJAX was first used in 2005 by Jesse James Garrett. However, the underlying techniques had been applied in limited ways in web-based applications since the late 1990s. The XMLHttpRequest object initially appeared in Microsoft’s Internet Explorer browser as an ActiveX object and was later adopted as a built-in feature by other browsers.

In the mid-2000s, applications such as Google Suggest and Google Maps brought AJAX to widespread attention; these projects enabled interactions such as fetching data without page reloads, auto-completion, and drag-and-drop functionality on maps.

Technical Components

1. Presentation Layer: Content defined using XHTML or HTML, styles defined using CSS.

2. Dynamic Interaction: Dynamic modification of page elements via the DOM.

3. Data Formats: XML, JSON, plain text, or other structured data formats.

4. Asynchronous Communication: XMLHttpRequest object or, in modern applications, the fetch() API.

5. Control Layer: Management of client-side logic and data flow between components using JavaScript.

Working Principle

In the traditional web application model, each user interaction sends a full-page request to the server, and the response results in the entire page being reloaded. In the AJAX model, the browser loads an “AJAX engine” during the initial page load. User interactions are first handled by this engine; when data is needed, a request is sent asynchronously to the server via XMLHttpRequest. The data returned from the server is processed only in the relevant section of the page, allowing the user to continue interacting with the rest of the page during this process.

This architecture eliminates the “start-wait-start” cycle that interrupts user interaction and forms the foundation of single-page applications (SPA).

Integration with Web Services

AJAX is commonly used in conjunction with SOAP or REST-based web services. Web services operate over the HTTP protocol using XML or JSON data formats and are platform and technology independent.

SOAP: XML-based data transmission with service definitions via WSDL.

REST: HTTP methods (GET, POST, PUT, DELETE) and typically JSON data format.

Through these services, the AJAX client abstracts database access and makes it available for use by different client applications.

Application Areas

  • Personalizable Portals: Reconfiguration of modular dashboard components according to user preferences.
  • E-Learning Systems: Dynamic loading of course content and real-time display of exam results.
  • Enterprise Applications: Management dashboards, statistical and reporting tools, data entry forms.
  • E-Commerce: Product filtering, shopping cart updates, price comparison applications.
  • Mapping and Location Services: Drag-and-drop and real-time data loading operations similar to Google Maps.

Advantages

  • Fast response times through data updates without page reloading.
  • Targeted data transmission that reduces server load.
  • Efficient use of bandwidth.
  • User experience similar to desktop applications.

Limits and Challenges

  • SEO Limitations: Dynamic content may not always be crawlable by search engines.
  • Browser Compatibility: Differences in XMLHttpRequest and DOM handling across browsers.
  • Security: Need for protection against XSS and CSRF attacks.
  • Debugging: Difficulty in detecting errors and synchronizing asynchronous data flows.

Prominent Applications

  • Google Maps and Google Suggest: Asynchronous data retrieval, instant suggestions, and interactive mapping.
  • Gmail: Listing, reading, and interacting with emails without page reloads.
  • Flickr and Amazon A9: Dynamic content loading and user interaction.
  • University Portal Applications: Personalizable information components in the Ege University portal project.
  • Mobility Learning Systems: Real-time delivery of course content to mobile devices via the FUMOO project.

Author Information

Avatar
AuthorNeriman ÇalışkanDecember 1, 2025 at 10:36 AM

Tags

Discussions

No Discussion Added Yet

Start discussion for "Ajax (Programming)" article

View Discussions

Contents

  • History and Emergence

  • Technical Components

  • Working Principle

  • Integration with Web Services

  • Application Areas

  • Advantages

  • Limits and Challenges

  • Prominent Applications

Ask to Küre