What’s wrong with Ajax Matt 01 Jul 2005

18 comments Latest by Joe

Ajax is due for some backlash. Alex Bosworth digs the awesomeness of it but says, “Ajax is also a dangerous technology for web developers, its power introduces a huge amount of UI problems as well as server side state problems and server load problems.” He’s created a Backpack page with a list of negative issues caused by AJAX. Some examples: Breaking the back button, Not using links I can pass to friends or bookmark, Asynchronously performing batch operations, etc. Got an issue to add? Reply to this forum at his site and he’ll add you to the list of people who can modify the page.

18 comments so far (Jump to latest)

Jomdom 01 Jul 05

I agree with a lot of his points, but I couldn’t help notice that some of the negatives Alex has listed aren’t nessisarily things wrong with the AJAX technology, but problems seeded by people overusing it or using it improperly.

My understanding is that almost any technology can be made to look good or bad in the light of how people are using/implementing it.

Honestly though, this is a bit of a touchy subject. I really don’t want to take sides. My 2 cents :)

Jomdom 01 Jul 05

Oh my! It seems that I read the whole page wrong… I was supposed to be reading the “Mistakes” as mistakes on the part of developers, not mistakes on the part of AJAX itself.

Sorry ‘bout that. Would it make it better if I said I am still drinking my first cup of coffee? :)

Dave Simon 01 Jul 05

AJAX is like Flash or HTML. It’s a web technology that, if put into the wrong hands, can be disasterous.

But, like any dog breeder will tell you, there is no such thing as a bad dog, but bad owners. ;)

kmilden 01 Jul 05

Use responsibly. As with Flash or DHTML.

David Jacobs 01 Jul 05

The lack of permalinks is the top on my list which you note. We’re solving that problem on one of my projects by using mod_rewrite to create parameters that just inform the javascript of the initial state they should hold. It’s kind of a hackish solution, but it allows us to provide a “link to these results” button, ala Google Maps’ “link to this.”

g 01 Jul 05

The back button itself is what is broken.

A poor workman blames his tools, etc.

Drive responsibly!

George Jempty 01 Jul 05

I actually just wrote a column for hotscripts.com’s monthly email newsletter: “Ajax’ Achilles Heel”; see my URL

Tomas Jogin 01 Jul 05

Seems to me that page doesn’t list problems with Ajax, but rather problems with over-enthusiastic developers.

Squeegy 01 Jul 05

It’s all about how you use it. Flash sites have the same problems and more, but it is possible to use Flash and a tasteful and useful way.

Same with AJAX. It’s a great tool but can be misused. These are all problems anyone whos designed a UI before should be aware of. Bad UI’s have been around long before AJAX. AJAX just gives you a new way to create a bad UI.

Anonymous Coward 02 Jul 05

After working with AJAX concepts a little, I am finding that the tool should be narrowly focused to things that genuinely need it. So far, every thing I considered AJAX for has been reverted back to the older approach, because the amount of dynamism AJAX supplies is too much for the user tasks I encountered - and they, being common, looked nice for the AJAX treatment.

One of the key things I noticed is that dang back button in the show. The browser cache remembers a page as it was originally loaded,

Brian Olsen 02 Jul 05

(this is a continuation of the last post - somehow I magically hit the submit button) …

The browser cache remembers a page as it was originally loaded, not the actions the user has done.

So my opinion is this: if AJAX is good for only one feature on a site, don’t use it. If it is good for a lot of features, there better be good reasons to use it. Otherwise, avoid it like the plague (and I might just take that advice myself, because I don’t see where it can actually be *useful*, unless I have free reign on, let’s say, an intranet site.)

Who is the one who said web applications are not desktop applications, or something of the sort?

Sam 03 Jul 05

that back button thing is really a pain for an end user. I was just this morning using a webapp that’s built mostly on javascript. Realized I made a mistake and clicked the back button (like I’ve been taught to do since 1993 by every web site ever) and *bam!* all my changes gone.

The back button is the ctrl+z for the web, please don’t break it.

Sam Barnum 04 Jul 05

Another annoying thing about XMLHttpRequest is that you always end up having a global object representing the xmlhttprequest object. So if you really do want to utilize the asynchronous aspect of AJAX, you need to jump through some hoops, probably setting things up so the request is passed to the callback function instead of being stored as a global variable.

There are definitely places for ajax, though. I think using within the scope of a single page won’t really break page navigation features like bookmarks and back buttons. This includes things like data validation, dynamic retrieval of hierarchical lists, or linking to related records. But once the form is completed, the resulting page should have its own URL, not be loaded via AJAX.

michael 04 Jul 05

What about Backpack? Is that considered a tasteful implementation of Ajax?

pb 05 Jul 05

Now I’m even more confused about the naming of Ajax. First, XML is definitely not required. In fact, it can be much better to use, for example, ascii that is suited for manipulation by JavaScript. Further, calls need not be asynchronous. Asynchronous-ness may even add some unncessary complexity.

kevin 05 Jul 05

Frankly, with a title like “Why AJAX is dangerous,” I’d expect people to lose some limbs. Only one thing on that list comes close to being dangerous, the rest of it is hyperbole.

Post a comment

(Basic HTML is allowed)

NOTE: We'd rather not moderate, but off-topic, blatantly inflammatory, or otherwise inappropriate or vapid comments may be removed. Repeat offenders will be banned from commenting. Let's add value. Thank you.