Need help on XHR (XMLHttpRequest).
Suppose I send a GET request to /msg.php. From there I receive the data (messages) and through innerHTML I deduce. Requests are sent via setInterval(message, 2000); that is, every 2 sec.
Here's a question, how to implement let's say this:
GET goes to /msg.php, wait 25 sec. is there an answer (or message), and repeat again.
Noticed, this principle works in VK (example)