停止浏览器"活动指示器厄运&QUOT的;在加载彗星/服务器推送iframe中 [英] Stop the browser "throbber of doom" while loading comet/server push iframe

查看:195
本文介绍了停止浏览器"活动指示器厄运&QUOT的;在加载彗星/服务器推送iframe中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用彗星或Ajax的龙拉技术 - 一个iframe通常使用。虽然该iframe等待漫长的连接关闭,浏览器正在旋转的活动指示器(进度/加载指示器)。

When using Comet, or Ajax Long Pull techniques - an iframe is usually used. And while that iframe is waiting for the long connection to close, the browser is spinning its throbber (the progress/loading indicator).

一些网站,例如etherpad.com,设法使它​​停止。

Some websites, for example etherpad.com, managed to make it stop.

他们怎么办呢?

推荐答案

挖了一天,并在网际网路的胆量一晚,这里以后就是我想出了:

After digging for a day and a night in the guts of the internets, here is what I came up with:

  1. 服务器发送的事件 - 非常酷,目前仅在Opera,但可能是HTML5的一部分,其他浏览器有时可能支持它。添加新的元素标签与内容类型应用程序/ x-DOM事件流的,它允许服务器可在客户端DOM 触发事件。它不应该显示进度指示器,据我了解。这也是一个标准的工作草案,而不是像整个IFRAME彗星事情黑客攻击。

  1. server-sent events - Very cool, currently works only in Opera, but may be part of HTML5 and other browsers may support it sometime. Adds a new element tag with content-type of "application/x-dom-event-stream" which allows the Server to fire events in the Client DOM. And it should not show a progress indicator, as far as I understand. It's also a working draft of a standard, and not a hack like the whole iframe comet thing.

XMLHtt prequest - 在Firefox和Safari浏览器,但不是在IE浏览器,它可用于长期拉动页面加载,使来处理,因为它们出现在每个readyStateChange事件片段。不会显示进度指示器*。 - 见下文

XMLHttpRequest - in Firefox and Safari, but not in IE, it can be used for long-pull page loading that enables to handle fragments as they appear on each readyStateChange event. Will not show progress indicator*. -- see comment below

的ActiveXObject(HTMLFILE) - 可在IE被用来创建一个页面/窗口是当前窗口范围之外。这使得进度指示器走开!加载的IFRAME将是一种无形的浏览器。

ActiveXObject("htmlfile") - can be used in IE to create a page/window that is outside of the current window scope. This makes the progress indicator go away! The loaded iframe will be in an invisible browser.

更多关于服务器发送的-事件:

More about server-sent-events:

  • <一个href="http://my.opera.com/WebApplications/blog/show.dml/438711">http://my.opera.com/WebApplications/blog/show.dml/438711

和更多的其他两种技术(也说明了这个问题越好): * <一href="http://meteorserver.org/browser-techniques/">http://meteorserver.org/browser-techniques/

And more about the other two techniques (also explains the problem better): * http://meteorserver.org/browser-techniques/

更深入地了解每一种技术,以及更多的技术:

Even more in-depth about each technique, and more techniques:

  • <一个href="http://cometdaily.com/2007/12/11/the-future-of-comet-part-1-comet-today/">http://cometdaily.com/2007/12/11/the-future-of-comet-part-1-comet-today/
  • <一个href="http://cometdaily.com/2008/01/10/the-future-of-comet-part-2-html-5%E2%80%99s-server-sent-events/">http://cometdaily.com/2008/01/10/the-future-of-comet-part-2-html-5’s-server-sent-events/
  • http://cometdaily.com/2007/12/11/the-future-of-comet-part-1-comet-today/
  • http://cometdaily.com/2008/01/10/the-future-of-comet-part-2-html-5’s-server-sent-events/

这篇关于停止浏览器&QUOT;活动指示器厄运&QUOT的;在加载彗星/服务器推送iframe中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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