Information Technology Reference
In-Depth Information
12
Chapter
Supercharging the User
Experience with AJAX
We're most of the way through the topic, and we haven't yet hit explicitly on one chronic
annoyance to web users in general, and mobile users especially: the dreaded refresh!
Why dreaded? Well, in the mobile world, as we've learned, speed is everything. The last
thing a mobile user wants to do is reload an entire webpage. Even if the “heavier”
aspects of the page are cached on the user's phone (such as graphics, fonts, etc.) the
phone's browser must still reload them into the browser. This takes an amount of time,
processing power, battery power, and the user's patience. Thankfully a series of
technologies exist that can help us, known as AJAX.
What Is AJAX?
AJAX stands for Asynchronous JavaScript And XML. Let's break down that name. The
first word, Asynchronous, may sound a bit daunting at first, but it's the whole key to
what makes AJAX special.
Asynchronous?
Most web pages are programmed to require communication in a send/receive/display
series. The user presses a button on a web app, the page sends the required
information to the server, the server sends back some response, and the app displays a
new page with that response on it. Back and forth it goes, until the user is finished with
the app. Each time the user interacts with the app, the page is refreshed completely.
This is, for some, the very definition of annoying.
Asynchronous transfer refers to the idea that we can break this chain down into simply
send/receive/display/send/receive/send/receive, and so on, instead of including the
display portion in each successive round. In other words, we can send and receive data
without ever loading a new page. An asynchronous call is simply a request that we make
211
 
Search WWH ::




Custom Search