如何让IE页面请求保持活动超过1分钟? [英] How can I keep an IE page request alive more than 1 minute?

查看:163
本文介绍了如何让IE页面请求保持活动超过1分钟?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您在Internet Explorer 7中直接(而非通过代理)连接到Internet并请求页面(获取/发布),则默认超时为1分钟。如果来自Web服务器的响应花了一分多钟,那么您最终会从IE获得网络错误。

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.

如何在IE中增加此超时?

How can I increase this timeout in IE?

Microsoft已记录如何更改默认保留 - Internet Explorer中的超时值,但这在我的PC中无效(Windows XP SP2,IE 7.0)。

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?

谢谢

推荐答案

KB813827正在讨论HTTP 1.1 keepalive,它与在请求之外保持与服务器的TCP连接有关。这与您的问题不同,即在请求期间保持连接活动。要配置每个连接超时,请参阅 KB181050

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:

避免请求时间out,你需要让服务器端脚本经常返回某些东西,以便向浏览器保证服务器没有死亡,结果即将到来。

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.

您具体取决于您使用的服务器端技术。在将任何内容发送回客户端之前等待整个响应正文和标题完成的任何内容都将消失。例如。 CGI你可以返回一个带有'Transfer-Encoding:chunked'的响应体,每隔一段时间吐出几个字节并保持连接活着。

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.

这篇关于如何让IE页面请求保持活动超过1分钟?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆