AJAX can be used on many situations. Some of them are described below:
- Update Small Portion of Website continuously:- You might have seen websites which provides cricket score. In such situation where only a piece of information should be updated on a webpage after particular interval continuously, AJAX is very helpful.
- Sorting/Filtering:- If you have data in table and you want to filter based on some value or sort based on some column, AJAX plays important role to fetch data from server asynchronously and update the table/grid.
- Chat Website:- Assume a chat website in which whole webpage is refreshed after each message you send. It would be bit annoying. In such case AJAX is be used.
- Blog Comment:- You can use AJAX where you want user to comment and start discussion. Scroll below and you can comment on comment section and it will send AJAX request to publish your comment.
- Autocomplete/AutoSuggest:- We all are aware of Google autosuggest. When we type keyword on Google search box, it suggest various options based on what we entered. It is done using AJAX.