When should AJAX be used?


AJAX can be used on many situations. Some of them are described below:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Share this thread


comments powered by Disqus


Social Media