I am making an application in which I have a div where a new news is
after every 5 second or so automatically. By automatically, I mean user
not send any request to server by clicking on anything. The approach I
event function of the div, which after every 5 second sends an ajax
to server and update that div with a new content. However, as I
that this thing needs to be implemented as a separate thread so that
the components on the webpage remains interactable. Is this the right
approach to solve this or is there a better way to do it?