Answer the question
In order to leave comments, you need to log in
How to organize the updating of data on the page at the initiative of the server?
In general, the essence of the question is in the title. There is, for example, ajax, with which you can dynamically update information on the page. But usually such an update occurs at the initiative of the client. That is, for example, he pressed a button, the information from the server was pulled up and updated on the page. But I need the opposite. There is a page, and on it, for example, the current temperature in the room is displayed. Is there a way to somehow change this number on the page without having to poll the server every second?
Answer the question
In order to leave comments, you need to log in
https://ru.wikipedia.org/wiki/WebSocket
or https://javascript.ru/ajax/comet/long-poll
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question