What is the full form of AJAX?
It is a technique used by developers to make websites behave like desktop applications. Most people think AJAX is a programming language. However, that's not true, AJAX is a technique that is a group of web technologies and not a programming language.
It operates on the client-side to create asynchronous web applications. With AJAX, web applications can send and retrieve data from a server in the background (asynchronously) without interfering with the user interface and behaviour of the existing page. It allows web pages and web applications to change content dynamically without reloading the entire page.
One of the well-known applications that are based on AJAX is Google Maps. Its interface allows users to change views and manipulate the map in real-time. AJAX applications do not require the installation of a plug-in and work directly with a Web browser.
How does AJAX work?
Applications, which use AJAX, use an engine that acts as an intermediary between the user's browser and the server from which it is requesting information. Instead of loading the whole web page, the User's browser loads the AJAX engine which further loads the page that the user sees.
Learn more about How does AJAX Work here.
Before AJAX, most websites were based on complete HTML pages. Each user action required that a complete new page be loaded from the server. This process was inefficient, as reflected by the user experience: all page content disappeared, and then the new page appeared. So, AJAX stepped in as the best alternative for solving these problems. Here is a brief history of AJAX:
- 1996 - Internet Explorer launched the Iframe Tag
- 1998 - The concept behind the XMLHttpRequest scripting object was developed by the Microsoft outlook web access team
- 2000 - It started finding its use in large scale online applications such as Outlook Web Access and Oddpost
- 2004 - Google used cross-browser AJAX with Gmail
- 2005 - Google used cross-browser AJAX with Google Maps and the term "AJAX" was first used by Jesse James Garrett in an article in the same year
- 2006 - The World Wide Web Consortium (W3C) released the first specification for the XMLHttpRequest object
- It increases the web applications' speed, performance and utility
- Ultra-fast response time
- Application-based on AJAX is very user-friendly
- Allows dynamic interaction with web apps
- Very flexible
- Has the facility to swap XML with JSON
- It is data-driven and not page-driven
- Designed for one-way communication only
- The majority of web crawlers except Google doesn't recognise AJAX
- Applications based on AJAX are very difficult to debug
- Because of the asynchronous nature of AJAX, each chunk of data that is sent or received by the client occurs in a connection established specifically for that event. This creates a requirement that for every action, the client must poll the server, instead of listening, which incurs significant overhead
Technologies used in AJAX
The Technologies used in AJAX are as follow:
1 HTML and CSS - For Presentation
2 DOM (Document Object Model) - For dynamic display and interaction
3 XMLHttpRequest - For asynchronous communication
4 JSON and XML - For Data interchange
Some of the advantages offered by AJAX are as follow:
Some of the disadvantages associated with AJAX are: