0

I want to make the below scenario:

The client stay on my website screen 1 and wait signal data that receive from my server. After receiving the signal data, then the client will be loaded to screen 2 immediately and automically.

Is it related to Socket? Any examples that can apply to my setup? or other way to do that?

The information of my setup:

Frontend: ReactJS; Backend: PHP

Another example:

The client stay on my website and they can get a new notification without reloading just like Stackoverflow notification.

Or client listen to a server database field when changing.

potato
  • 203
  • 2
  • 15
  • you can use polling or socket, you need to decide which one suits your use case. if you just need to poll very often, then polling will work. – Zohaib Ijaz Feb 18 '20 at 13:26
  • Does this answer your question? [What are Long-Polling, Websockets, Server-Sent Events (SSE) and Comet?](https://stackoverflow.com/questions/11077857/what-are-long-polling-websockets-server-sent-events-sse-and-comet) – nice_dev Feb 18 '20 at 13:26
  • @ZohaibIjaz Thanks for reply, I just saw the information that you suggested. Polling maybe work for me. And I just got a similar example that I want: The client stay on my website and they can get a new notification without reloading just like Stackoverflow notification. – potato Feb 18 '20 at 13:40
  • 1
    @vivek_23 Thanks for reply, I just saw the information that you suggested. Polling maybe work for me. And I just got a similar example that I want: The client stay on my website and they can get a new notification without reloading just like Stackoverflow notification. – potato Feb 18 '20 at 13:40

0 Answers0