So you want to learn AJAX? You may already know a web language or two and you want to move on to something cooler, or you may have heard about AJAX and are curious about it, or one of many other reasons. Whatever your reason(s) may be, AJAX is a great to learn and know!
This tutorial focuses on:
- What you should already know
- What is AJAX?
- What AJAX is not
- Support for AJAX
- AJAX in action
What you should already know
What is AJAX?
The cornerstone of AJAX is the XMLHttpRequest object (covered in detail in the next tutorial). It is this object that allows for AJAX to communicate with a web server and change the content on it without actually reloading that page and this eliminating the need for a submit button.
This is all achieved by using HTTP requests between a web browser and a web server that allow web pages to request small chunks of information from web servers as opposed to entire pages. Internet applications are consequently smaller, faster, and more user-friendly.
What AJAX is not
Support for AJAX
AJAX is not supported the same way on all major browsers.
For Internet Explorer, the ActiveXObject is used for AJAX, while for other browsers the XMLHttpRequest object is used for AJAX.
To learn about the support available in different browsers for AJAX in more detail, check out our AJAX browsers page.
AJAX in action
You can see AJAX in action at the following places:
Google created their Google Suggest tool to instantly show the most popular results in a drop down style list as you type letters into a search box.
Visit Google Suggest
The popular bookmarking site del.icio.us uses AJAX in a similar way to Google Suggest. When you type a tag to associate with a bookmark, it will suggest a list of tags as you type.
An online store that gets rather creative with AJAX. This site uses AJAX to allow the user to drag an item into a shopping cart which gets updated automatically.
Visit Panic Goods