问题描述
示例:转到您的 Facebook 墙,滚动页面末尾,Facebook 将异步加载更多墙帖.或者只需单击墙上帖子中的图像.图片对话框(带有评论和更大的图片)也在异步加载.(您可以使用 firebug 看到 GET 请求).
example: Go to your Facebook wall, scroll the end of the page, Facebook will load more wall posts asynchronously. Or just click on an images in your wall post. The image dialog (with comments and larger image) is loading asynchronously as well. (You can see the GET requests with firebug).
但是通过查看 firefox 选项卡,您会看到加载指示器,就像发生回发时一样.
But by looking and the firefox tab, you see the loading indicator, just like when a postback occurs.
我知道这可以通过使用 IFrame
并更改其 src 来实现.就像 iGoogle 所做的那样.但我不确定 Facebook 是否使用 IFrame 来加载额外的墙贴.还有其他方法可以实现吗?
I know this can be achieved by using an IFrame
and changing its src. Just like what iGoogle does. But I'm not sure if Facebook uses an IFrame to load additional wall posts. Is there another way to achieve this?
更新:通过说加载指示器";我不是说 ajax 指示器.
正如我所提到的,浏览器指示器(在标签的左侧显示页面是否正在加载)会像回发一样变为正在加载.
Update: by saying "loading indicator" I did not mean an ajax indicator.
As I mentioned the browser indicator (the one at the laft side of a tab showing us if the page is loading) changes to loading like it is a postback.
推荐答案
不是 AFAIK.我的猜测是他们可能将 IFrame src 设置为 ajax 方法,并在加载时将内容移动到 div(或其他元素).
Not AFAIK. My guess is they probably set the IFrame src to an ajax method and when loaded, they move the content to a div (or another element).
这篇关于在 ajax 调用上显示 *browser* 加载指示符(如发生回发时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!