H
H
hrvasiliy2014-09-16 13:53:03
PHP
hrvasiliy, 2014-09-16 13:53:03

Are real-time applications made through web sockets?

Well, in fact, everything is said in the title of the question) If a little more in detail: I want to configure the launch of the script on the server by cron and so that the site is updated for users without manually reloading the page...

Answer the question

In order to leave comments, you need to log in

4 answer(s)
G
Gasoid, 2014-09-16
@hrvasiliy

yes, real-time applications are made through websockets, only cron will not work

O
Oleg, 2014-09-16
@mayken

You can use ajax via setInterval :)

T
theaidem, 2014-09-16
@theaidem

It depends on the specifics of your application, if you only need to send content one-way, then html5_serversentevents is well suited, for example, for news feeds or event notifications, and if two-way communication, then yes WS (chats, online games). It is possible to combine these two directions

F
FanKiLL, 2014-09-16
@FanKiLL

Or web sockets or https://ru.wikipedia.org/wiki/Server-sent_events SSE when something happens on the server you send this data to the client.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question