PHP in real time

Asked

Viewed 23 times

0

I have come across a situation that for me is complex. How to update a content in an HTML page without having to refresh the page, whenever the database is changed, the data is modified without refreshing it. Just the new data. I searched for Ajax, but some friends said it overloads the server when it has many users. PHP long Polling, even full close to implementing it, but did not stay the way it wanted. It’s like the Facebook comments tab, when a new comment is sent, it only appears on the page, without updating the content or the page. I don’t want code made. I want answers to methods to do this, the pros and cons, has anyone out there ever used it or used it? You can use as a comparison of what I need, the real-time features of this site. Stack Overflow.

  • This is exactly Ajax. It is not that it overloads the server, it is that would be N queries from time to time, even because Ajax is client-side, ie demand of client processing, but in your case it makes requests in the database (server).

  • @Rbz, Stackoverflow does not use ajax for this. It uses Websockets.

  • @Luizfelipe I wanted to comment more in the context that he had passed. But also did not know that the OS used it. Rs

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.