There are many cases when require to update certain part of the web page on the regular basis.
For example – showing live cricket or football score, display latest news feeds,etc.
There are two ways to send AJAX request on specified time –
- By setInterval() and
Both do the same work but they are reliable for certain cases, which I discuss in this tutorial.