facebook 聊天窗口是如何实现的? [英] How are the facebook chat windows implemented?

查看:28
本文介绍了facebook 聊天窗口是如何实现的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


(来源:k-director.com)

主要内容是在 iframe 中还是页脚和聊天窗口是 iframe 中的内容?

后者似乎不可能,因为在这种情况下,当您单击主页中的链接时,所有内容都必须重新加载,包括页脚 iframe.

如果您刷新页面,聊天窗口会重新加载,但如果您通过单击链接浏览网站,则不会.

谢谢.

解决方案

如果您安装 FireBug 并为 Facebook 启用网络监视器,您将看到当您单击应用程序内的大多数链接时,您并没有执行完整的操作页面刷新,而是使用新内容更新页面的 AJAX 调用.

它看起来像一个新页面,但实际上你在同一页面上,除了聊天栏外几乎所有东西都被替换了.

On Facebook you can browse the site without affecting the floating chat windows. Seems like if the main page was inside an iFrame and the footer and chat windows where floating outside.


(source: k-director.com)

Is the main content inside an iframe or are the footer and chat windows the ones inside an iframe?

The later doesn't seem possible because int this case when you click in a link in the main page everything would have to reload, including the footer iframe.

If you refresh the page the chat windows are reloaded, but if you browse the site by clicking links they are not.

Thank you.

解决方案

If you install FireBug and enable the net monitor for Facebook, you'll see that when you click most links inside the application, you're not doing a full page refresh, but rather an AJAX call which updates the page with the new content.

It looks like a new page, but in reality you're on the same page with just about everything but the chat-bar replaced.

这篇关于facebook 聊天窗口是如何实现的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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