Question:
What is AJAX?
Answer:
AJAX stands for Asynchronous Javascript And XML
Question:
What does AJAX do?
Answer:
AJAX provides a way to get data from a web server, without having to get a completely new web page.
Question:
How does AJAX accomplish that?
Answer:
The Asynchronous portion is the key. Normally, computer events happen sequentially. In the web world,
that means:
- you request a page (a file on the server)
- the browser waits for the page
- the page is delivered
- the browser displays the page
With AJAX, when you request a file from the server, the browser does not have to sit and wait for the
page to be delivered, it can continue to allow you to interact with the current page,
such as filling in a form with required information.
Question:
How do I use AJAX?
Answer:
As indicated above, AJAX allows you to get another file from the server, while remaining on the current web page.
When the new file is delivered, JavaScript can process the data, and show it on the current web page - this is called
"partial refresh". For a demonstration, please see the Week 11 example.