Quantcast
Viewing all articles
Browse latest Browse all 7

When to Use AJAX

Consider Your Goals

When considering implementing an AJAX pattern on a website or web application, you should first consider your goals. While there are several good reasons to implement AJAX, there are also several bad reasons. This all depends on what you’re trying to accomplish.

AJAX the Wrong Way

There are a lot of pitfalls if you choose to implement AJAX on something like a blog or a company site. For example, you implement AJAX so that when a user clicks on a top-level navigation link, the main content of the page changes. While this may seem like a relatively spiffy thing to do, it is not a good practice for several reasons:

  1. Search Engine Optimization (SEO) is not optimized.  Search engine crawlers will not be able to follow the JavaScript and read content that is injected to the DOM.  However, an article posted by David Pireck gives us some insight on how to workaround this issue.
  2. Users may have trouble navigating the site. Users might not be able to bookmark pages or access the history via the browsers back and forward buttons properly.  Reluctantly, I found this jQuery history plugin to assist with this matter.
  3. Your website may be less compatible with other browsers.

AJAX the Right Way

Albeit quirky at times, the Facebook chat widget is a wonderful implementation of AJAX. The widget uses AJAX to retrieve a list of your friends, displays whether they are idle, and allows you to communicate with them without refreshing the entire page. All of this is a reflection of using the right tool for the right job.

Let’s assume you create a company website for your insurance company. The company website offers a wizard for users to request a quote. Implementing AJAX may be a smart decision if you:

  1. Do not wish to display a portion of the wizard in search results.
  2. Implement a client-side mechanism that allows the user to navigate to a step with the browser’s back or forward buttons.
  3. Display a progress bar indicating the users place in the wizard.

Favorite Examples

Lastly, here are some public facing websites featuring some of my favorite AJAX implementations:

In Conclusion

I hope the above information and examples were of use to you. If you feel you can contribute to this article, feel free to post a comment below!

Share and Enjoy: Image may be NSFW.
Clik here to view.
RSS
Image may be NSFW.
Clik here to view.
del.icio.us
Image may be NSFW.
Clik here to view.
StumbleUpon
Image may be NSFW.
Clik here to view.
Digg
Image may be NSFW.
Clik here to view.
Twitter
Image may be NSFW.
Clik here to view.
Mixx
Image may be NSFW.
Clik here to view.
Facebook
Image may be NSFW.
Clik here to view.
LinkedIn
Image may be NSFW.
Clik here to view.
Reddit
Image may be NSFW.
Clik here to view.
Yahoo! Buzz
Image may be NSFW.
Clik here to view.
Technorati
Image may be NSFW.
Clik here to view.
co.mments


No related posts.


Viewing all articles
Browse latest Browse all 7

Trending Articles