如何使 IE 页面请求保持活动状态超过 1 分钟?
如果您直接(而不是通过代理)连接到 Internet 并在 Internet Explorer 7 中请求页面(获取/发布),则默认超时为 1 分钟。 如果 Web 服务器的响应时间超过一分钟,那么您最终会从 IE 收到“网络错误”。
如何增加 IE 中的超时时间?
Microsoft 已记录如何更改 Internet Explorer 中的默认保持活动超时值,但是这在我的电脑(Windows XP SP2、IE 7.0)上不起作用。
有谁知道如何实现这一目标吗?
谢谢
If you are connected to the Internet directly (and not through a proxy) and requests for a page (get/post) in Internet Explorer 7, the default time-out is 1 minute. If the response from the web server takes more than a minute then you end up getting a "Network error" from IE.
How can I increase this timeout in IE?
Microsoft has documented How to change the default keep-alive time-out value in Internet Explorer, but this does not work in my PC (Windows XP SP2, IE 7.0).
Does anyone out there have a clue on how to achieve this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
KB813827 讨论的是 HTTP 1.1 keepalive,它与在请求之外保持与服务器的 TCP 连接保持打开状态有关。 这与您的问题不同,您的问题是在请求期间保持连接处于活动状态。 要配置每个连接超时,请参阅 KB181050。
假设这里的编程角度是您正在尝试编写一个需要很长时间才能完成的服务器端脚本:
为了避免请求超时,您需要让服务器端脚本返回一些东西时不时地向浏览器保证服务器还没有死机并且结果即将到来。
具体如何执行此操作取决于您使用的服务器端技术。 在将任何内容发送回客户端之前等待整个响应正文和标头完成的任何内容都将被淘汰。 例如。 CGI 您可以返回带有“传输编码:分块”的响应正文,以每隔一段时间吐出几个字节并保持连接处于活动状态。
或者,立即返回页面并在后台生成长进程,然后让客户端页面轮询其完成情况。
KB813827 is talking about HTTP 1.1 keepalives, which are to do with keeping a TCP connection to the server open outside of a request. That's not the same thing as your problem, which is keeping a connection alive during a request. To configure the per-connection timeout see KB181050.
Assuming the programming angle here is that you are trying to write a server-side script that takes a long time to complete:
To avoid the request timing out, you need to have the server-side script return something every so often to reassure the browser that the server hasn't died and a result will be forthcoming.
How exactly you might do this depends on what server-side technologies you're using. Anything that waits for the entire response body and headers to be completed before sending anything back to the client is out. In eg. CGI you could return a response body with 'Transfer-Encoding: chunked' to spit out a few bytes every so often and keep the connection alive.
Alternatively, return a page right away and spawn the long process in the background, then have the client side page poll for its completion.
来自同一篇文章,
这可能是这些设置不适合您的原因。
From the same article,
This may be the reason the settings are not working for you.