When frontend communicates with the backend, it's good idea to show user that something is happening.
If you want some cool loading animations (aka throbbers), check out this site for their CSS & HTML code ready for copy&paste.
setInterval
to query the server periodically for new data