1

See first https://www.phpflow.com/demo/html5_inline_editing_with_php_demo/ The following

You sit there that something changed in the database, and then save the same on my web session. But I want to have when I see something, that it also is on a different computer. Because another computer should now refresh to see the updates, but how do I fix it on other computers it is going to be adjusted? Without refresh. Only am completely new to Ajax such as JavaScript, so I understand there largely none of. Would you guys want to help me in this?

Ewent
  • 33
  • 2
  • I hear from other people that I better websocket can use, because ajax than too much unnecessary requests sends – Ewent Nov 09 '17 at 21:53

1 Answers1

1

I hear from other people that I better websocket can use, because ajax than too much unnecessary requests sends

You are correct. ajax (or any http request javascript or anyone else makes) is bound by the current server/client mode of communication wherein the server only responds to requests, it never initiates contact with a client.

Hence, anything using ajax must constantly refresh to get new data.

If you want the server to be able to tell the client about something new, without being asked, you will have to use something like websockets.

This looks like a good place for you to start: http://www.phpbuilder.com/articles/application-architecture/optimization/creating-real-time-applications-with-php-and-websockets.html

Kallmanation
  • 1,132
  • 7
  • 11