Why is this page text-only?

The Problems with AJAX

AJAX is the latest industry buzz-word and to hear people talk you'd think it'd have to be the best thing since sliced bread. I'll go on record as saying that I think AJAX is awesome but, since every other article touts how amazing it is, I'd like to play devil's advocate and point out a few of it's flaws.

JavaScript - AJAX functions entirely by using lots of client-side JavaScript to send requests to the server and update data on the page. No JavaScript means that none of your cool functionality works at all. Providing a non-AJAX alternative may require a lot of extra work.

The Back Button - This is fairly similar to what happens with Flash sites. The user does something, does something else, then wants to return to the previous task so they click the back button. When you're serving normal HTML pages this works great. In an AJAX application however, the back button is essentially rendered useless.

Analytics - Having standard HTML pages provides an easily mechanism to track what your users are doing. AJAX slightly complicates this by replacing some of the pages with asynchronous JavaScript calls. While not impossible, it does have the potential to add a layer of complexity to capturing analytical data. I should note however, that there are companies such as Crazy Egg that are actively working to solve this problem.

Accessibility - Having pages that rely heavily on JavaScript and updating dynamically has the potential to wreak havoc on screen reader type programs for users with visual impairments.

Search Engine Optimization - At this time it may be difficult for search spiders to properly index content returned through complex AJAX updates.

Pasting a Link - The page updates frequently but the address bar never changes. When you cut and paste the link to your buddy, they just see the homepage instead of the info you intended. (Google Maps solves this nicely with a 'Link to this Page' button that updates the URL)

I'm certainly not trying to discourage AJAX use as none of these issues is insurmountable. As with all new technologies however, I would encourage caution and careful consideration before deploying. It's important to understand why you're using the technology instead of using it just to brag that you built an AJAX site. Remember when everyone had to have an all-Flash site, or crazy DHTML? That was the cool thing to do but people quickly learned that it wasn't always the right thing to do. I would urge people to remember that lesson and use the same caution here. AJAX is a fantastic technology and can be greatly beneficial when used properly. Let's do our best to ensure that it stays that way.

I'm out of town for a few days but after that I'll be back with some code samples on how to do some pretty neat things using ASP.NET 2.0 and Atlas.

Del.icio.us Digg Yahoo! My Web Seed Newsvine reddit Technorati Facebook StumbleUpon Mark in ma.gnolia Google Bookmarks Windows Live

TrackBacks

TrackBack URL for this entry:
http://www.codescene.com/cgi-bin/mt/mt-t.cgi/42

Listed below are links to weblogs that reference The Problems with AJAX:

» Solutions for Ajax Pitfalls from TechRoam
Problems and Solutions for Ajax Development Like anything else, Ajax has some pitfalls that developers should understand. The first issue concerns visual feedback because Ajax requests via XMLHttpRequest do not provide any feedback. To clarify, when ... [Read More]

4 Comments

Try new Google Webtoolkit,it deals with backbutton

If you have 90 mins to spare check out this Google Tech Talk on vulnerabilities with client-side scripting. It's enought to scare the JS right out of you!

http://video.google.com/videoplay?docid=5159636580663884360&q=type%3Agoogle+engEDU

Nice summary regarding the issues of AJAX. At Crazy Egg, we are definately trying to help people understand how their visitors interact with new technologies, such as AJAX.

Its nice to see someone recognizing this! Keep up the insightful posts, and if you'd like to checkout Crazy Egg for yourself, email me at info at crazyegg.com

I think MAgicAjax is much more simpler than Atlas

http://www.dotnetspace.com

I hope this can help

Leave a comment