JQuery & PHP - can I push from the server?

后端 未结 5 1284
野趣味
野趣味 2021-02-20 11:18

I am just starting to look at JQuery; until now everything has been PHP.

Just curious: if the server detects an event and wants to update the user\'s browser, can I do s

5条回答
  •  故里飘歌
    2021-02-20 12:17

    Client has to poll, but you can do long polling, i.e. keep the request alive until the server has an event to push back (i.e. complete request).

    Otherwise, you can use Web Sockets.

提交回复
热议问题