AJAX vs WebSockets
• There are several technologies to solve these problems
• AJAX stands for Asynchronous Javascript And XML (eXtensible Markup
Language), and is really an approach rather than a technology.
• AJAX was coined in 2005 by Jesse James Garrett, using asynchrous http
requests to a remote server and receiving XML data which could be parsed
using javascript and dyanmically update a webpage, using the DOM.
• Each AJAX request is a single http protocol exchange, and is done
asynchronously, so that waiting for a response does not freeze the
environment.
• The server will send the response as a data object (XML or JSON), which
can then be factored into the current page.
• Websockets (2011) maintain an open two way connection between a
program running on a broswer, and a server, allowing the continual
exchange of data.
• We will focus on AJAX for now, as it is the more fundamental technology.