开发者

How to push an alert or message to web page visitor?

I am wondering if this is possible to push a message from server to web browser?? Like you want to alert user or any message that you want to send to specific user... An example is as chat invitation is sent from chat operator to site visitor...

Is it possible?? i prefer to use PHP, Javascript

I don't want to use AJAX calls to PULL, i want to PUSH.

Looking for开发者_C百科ward.


You can't actually push yet. You can use Comet techniques, including long-polling, but you can't actually push yet. Someday you'll be able to use web sockets.


I think the way to do this is just to use AJAX to pull every so often.


You would have to be running some sort of program on the client that you can push stuff to.

Like

  • an IM client or similar program
  • a browser window with a page that does frequent Ajax checks (probably the most easy way to go)
  • a browser window with a page that has a COMET connection open.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜