What is AJAX?

After seeing a couple of my recent experiments mislabeled as AJAX-enabled, I think some explanation is in order.

What is AJAX?

AJAX is a new term coined just four short months ago by the folks over at Adaptive Path. I suggest you give it a read if you haven’t already. As they explain, AJAX stands for Asynchronous JavaScript And XML.

At the core of all this is XMLHttpRequest. It allows a call to be made to the server and data to be returned, all through JavaScript. A user can click on a button and instead of refreshing the whole page, you just update the parts of the page that have changed. Once only available in Internet Explorer, it has made its way into other browsers like Firefox, Safari and Opera. And with the increased support has come the flood of new implementations.

What AJAX isn't

So, where does the confusion come from? With pages no longer going through the usual refresh cycle, AJAX creates a user experience where parts of the page update like magic. But this magic is merely a side effect of the technology, not a direct result. It's DOM scripting that produces the experience.

The preview functionality on this page, for example, never needs to hit the server to actually display the information. The month validator, also recently described as AJAX, never has to hit the server to validate the results. The search functionality on this site, however, is AJAX enabled. It actually makes a call to the server to return results and update the page.

Is it AJAX?

The next time you see some dynamic functionality on a site and wonder if it's AJAX-enabled, ask yourself if the page needed anything from the server to perform the task. If it didn't then there's a good chance it's not using it. Ultimately, nothing beats checking the source code to know for sure!

Want to know more about AJAX, check out the detailed description in Wikipedia.

Published June 22, 2005 · Updated September 14, 2006
Categorized as JavaScript
Short URL: https://snook.ca/s/376

Conversation

13 Comments · RSS feed
Jeff Parker said on June 22, 2005

Thanks that certainly clears it up a lot. I never seen that paper from adaptivepath and have been wondering what the heck the whole big deal with AJAX was I kept looking and looking and people showing example when they were really doing DHTML I was seriously sitting there going ok what is the difference between AJAX and DHTML. I had been doing the IE XMLHttpRequest for a long time as well I just always considered it DHTML as well but now it has a name. Now does this also include Flash? I know years ago even in Flash 4 I could do XML requests back to the server and update flash, while this may have changed I haven't done Flash stuff since 4.0 but would that be considered AJAX as well?

Jonathan Snook said on June 22, 2005

Jeff: The term AJAX is specifically JavaScript-based and not Flash. Flash still supports XML calls to the server but it's best we not label it AJAX as that would add to the confusion.

Oliver Zheng said on June 22, 2005

Is anything Javascript + server-side scripting considered Ajax? Before Adaptive Path came up with the name, this method was still used (although not widely). What was it called back then?

John Zeratsky said on June 22, 2005

Oliver: It's only AJAX if it uses Javascript + XMLHttpRequest to retrieve data from the server and update the specific element on the web page.

Yeah, this stuff has been around for a while -- but I don't think what we now call AJAX had a name before.

John Zeratsky said on June 22, 2005

By the way, great job on the design of this site, Jonathan! The color work is awesome, and your use of three columns is exemplary.

Jonathan Snook said on June 22, 2005

I've heard it called Remote Scripting as well. Previously, for cross-browser support, people used hidden iframes that would run and upon reloading would pass information back to the main window.

The way Adaptive Path describes it includes the use of XML/XHTML and DOM scripting specifically but I feel like the term is better applied to any implementation of JavaScript and XMLHttpRequest.

Rob Mientjes said on June 23, 2005

Agreed on all but one: not just XML. I think fetching any server-side output counts as remote scripting or AJAX. It's a pars pro toto.

nuffGigs said on June 23, 2005

I think anyone interested in using AJAX should read this article first.

The interest in AJAX (aka DHTML) is great but there is nothing new or unique about it. It's just the latest in a long list of must have buzzwords. Google made this version of remote server calls popular and AdaptivePath jumped on it.

I got caught up in the hype myself. I read dozens of articles about it just to realize that I created many "AJAX" web apps before the term AJAX.

nuffGigs said on June 23, 2005

Google releases AJAXSLT.

Eerio said on June 29, 2005

Take a look on the hp of Backbase
They're specialised in making so called Rich Internet Apps. Check out the demo of the webshop especially. It is a great example of what can be accomplished with AJAX-based design.

AvP said on October 27, 2005

Great job on the design of this site!

HIndu said on October 19, 2006

Does web/graphic designers need to know this or is it just a developer thing?

Tony said on October 30, 2006

Thanks for the description, i have heard often of ajax, but i didn´t know ot exactly...

Sorry, comments are closed for this post. If you have any further questions or comments, feel free to send them to me directly.

Want to learn about scaling CSS for large projects?

I'm available for full and half-day workshops on scalable CSS architecture. I can provide on-site training for your team. Interested?
Get in touch.