Chlorine hazard: do not mix cleaning agents
A while ago, pondering the hype surrounding the emperor’s new Ajax clothes, Henning Koch boggled whether the talk about accessibility had been lip service all along. That piece wedged an idea into the back of my mind that I couldn’t quite grasp. It was finally kicked loose by Shelley Powers’ clarification of the reason she was perplexed by the hype.
I do believe Ajax is somewhat exciting. The current hype is way beyond reality, but it’s a very useful technique nonetheless. The place it has is in web applications which, according to precedent in the C language, one might refer to as having “volatile” session state. The distinction is that the server-side state of a session is not dependent solely on the requests sent by the session client, and that it is desirable to keep the user’s screen up to date without interrupting their interaction with it.
Chatrooms are the best example: the chat backlog must be periodically refreshed. In the meantime, the user may have entered an incomplete message. On a frameless page combining both the backlog and some text input, a full refresh would clear that partial message and therefore is unacceptable. Traditionally there was no sane model for implementing webchats other than to use at least one frame. Using XMLHttpRequest however, you can simply render a static backlog on such a frameless page, adding intermittent chat in-place inside the same window without refreshing. This increases usability for scripting-enabled clients. Meanwhile, scripting-challenged clients can manually submit forms and refresh the page, exactly the way they would have in any other web application, except more accessibly so compared to webchats that use frames. Everyone wins.
In this way, Ajax compounds the user experience, rather than constituting it.