简体   繁体   English

Apache2没有响应

[英]Apache2 not responding

I am trying to make Comet requests via Prototype/php like here : http://www.zeitoun.net/articles/comet_and_php/start 我正在尝试通过Prototype / php发出Comet请求,例如: http : //www.zeitoun.net/articles/comet_and_php/start

But!!! 但!!! While connection 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 非常非常tnx

Comet works by keeping a connection open between the server and the client. Comet通过保持服务器与客户端之间的连接打开来工作。 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. 浏览器具有允许页面建立的最大连接数(例如IE最多2个),我认为它也可能会将同一域的所有请求组合在一起。 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. 我相信不是服务器故障,这是浏览器,使用iframe是您所提到的正确解决方案,但这不是服务器故障。

[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. 这样一来,您将拥有多页更新的外观,而随时仅需要1个彗星连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM