How to make all connected browsers reload initiated by a server-side event

前端 未结 7 1419
忘掉有多难
忘掉有多难 2020-12-19 17:42

Suppose there is a webpage with dynamically generated content -- say a div containing the current number of connected browsers. When the count changes on the server I want a

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-19 17:59

    HTTP protocol is stateless by design. The only one way to achieve this is to implement client-side polling via AJAX.

提交回复
热议问题