How does one do realtime updates of a web page?

后端 未结 7 1837
囚心锁ツ
囚心锁ツ 2021-01-03 04:49

Google\'s GMail service does it because it integrates Google Talk -- and Etherpad (now typewith.me) made famous the system which is used by, for example, Google Wave. All su

7条回答
  •  被撕碎了的回忆
    2021-01-03 05:41

    As everyone says.. AJAX.

    The client keeps on asking the server, after say 30 secs if there is anything new for it to do. Also, you can set the timeout value on an ajax request. keep the time out a bit high.. and the server replies whenever there is something new.

    There is no way that the server can other wise ask the client to load some data.

    If you are thinking of implementing something on the same lines, look up strophe.js which is an XMPP js-library

提交回复
热议问题