Why is this page text-only?

Results tagged “Analytics” from Code Scene

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.