如何让AJAX触发浏览器的负载指示 [英] How to have AJAX trigger the browser's loading indicator

查看:163
本文介绍了如何让AJAX触发浏览器的负载指示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做一个Ajax功能的实验室调度程序,以及一些Ajax操作的不完全快。

I'm making an ajax-enabled lab scheduling program, and some of the ajax operations aren't exactly quick.

在Gmail中,当你去你的收件箱,发送邮件等浏览器就像它的加载(在FF停止按钮变为启用,进度条出现),但它不是一个新的一页,它的完成通过AJAX。

In Gmail, when you go to your inbox, send a message, etc. the browser acts like it's loading (In FF the stop button becomes enabled, the progress bar appears), but it's not on a new page, it's done via AJAX.

他们是如何做到这一点?我有一个小spinny指标,但是这将是一个很好的接触有浏览器的行为就像是装载。任何想法?

How do they do this? I have a little spinny indicator, but it would be a nice touch to have the browser act like it's loading. Any ideas?

推荐答案

我觉得这个就是你的答案。 (反向AJAX或Obviously.com慢加载技术)

I think this is your answer. (Reverse-AJAX or "Slow Load" technique from Obviously.com)

看起来像Gmail和Facebook的方法(浏览器显示页面的加载以加载图标等等 - 它只是模拟,因为有一个背景Ajax请求):)

Looks like the GMail and Facebook method (browser is showing page as "loading" with loading icons etc. - it is just simulating, because there is a background ajax request) :)

这篇关于如何让AJAX触发浏览器的负载指示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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