A
A
alex_1242018-07-17 18:16:12
AJAX
alex_124, 2018-07-17 18:16:12

Update information in real time?

The bottom line is this:
*Those who used Google documents should actually understand) *
How can I make sure that the information from the server (to which the information has just arrived) is updated on all clients (web, software) in real time
In Google docs you write the text, and it is there and then updated
Earlier read about ajax. And what is on the node.js server
But, it seems to me, this technology is outdated, Ibn I read about it 5 years ago, maybe more
Tell me, maybe someone repeated this process

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2018-07-17
@alex_124

Previously read about ajax. And what's on the node.js server

anything can be on the server if ajax
did you read about html yesterday? Or about js ? What nonsense? So far there are no analogues of ajax. Of course, many can start kicking me in the direction of WebSocket, they say that's the same analog, but they solve albeit similar, but different tasks. Ajax is more often justified than WebSocket because it's simple. WebSocket should be used where ajax entails resource overruns, critical or not able to solve the problem at all.
In your case, I don't think you need WebSocket.
Which one? Get focus loss event on input and send data to server? Every second site, a simple jQuery implementation example
$('input').blur(function() {
      var data = $(this).val();
      $.post('/someUrl/',data,function(){
         alert('я отправилось');
      });
  });

By the way, if you open the console in Google Docs, you will see ajax

A
Alexander Pushkarev, 2018-07-17
@AXP-dev

https://ru.wikipedia.org/wiki/WebSocket

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question