Spiga

Know When You Shouldn't Use Ajax

Ajax is, without a doubt, preety cool, but what's cool isn't always what's best (despite what you thought in high school). As with any technology, employ Ajax because you should (when it adds useful features without adding more problems and excluding users), not because you can or know how.

Since Ajax relies upon Javascript, one potential problem is that not all users enable Javascript and it can run differently on different browsers. A well-implemented Ajax example can work seamlessly on any browser, but you really need to be thorough. You can also create a non-Ajax version of a system for those with Javascript disabled: not difficult, but again, something you do need to think about.

Another problem is that Ajax renders the browser's history feature unusable. For that matter, you can't bookmark Ajax pages the way you can search results (the page itself can be bookmarked, but not after some interaction). So by adding functionality, your Ajax application will remove common features.

And Ajax request still require a server connection and the data transfer, so they don't save any resources, just reallocate them.

Finally, I'll point out that there's an argument to be made that IFrames offer similar functionality to Ajax but without some of its downsides.

0 comments: