开发者

Apache2 not responding

I am trying to make Comet requests via Prototype/php like here : http://www.zeitoun.net/articles/comet_and_php/start

But!!! While con开发者_如何学JAVAnection is open, other pages from my project is not loading from the same browser. What can I do to provide normal behaviour?

Very very tnx


Comet works by keeping a connection open between the server and the client. Browsers have a maximum number of connections that they will allow a page to make (something like 2 max for IE), I think it might also group all requests for the same domain together. That is why connections are not going through for you.

I believe it is not the server that is at fault here it is the browsers, using an iframe is the correct solution here as you mentioned, but it's not the servers fault.

[Edit] Simplest solution for you is to monitor focus. When the page has focus, open a connection, when it is lost(ie. user switches tabs) close the connection and wait for focus again before updating the page. That way you will have the appearance of multiple pages updating while only needing 1 comet connection at any time.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜