在我的网站上加载 Facebook 社交插件(如框)时,如何阻止 IE 挂起?
我已经使用异步 JS SDK 在我的网站上实现了 Facebook Like 按钮,效果非常好!然而,加载需要很长时间,这不是一个大问题(如果加载速度更快的话会更好..),因为页面的其余部分加载得很好。
但是,如果您在任何版本的 IE 中查看该网站,整个页面都会无响应,直到 Facebook 点赞/评论加载完毕...所有图像和其他脚本都已加载,但整个页面被锁定。
关于如何为 IE 用户纠正此问题有什么想法吗?
我看过这篇文章: 如何防止 Facebook Like 按钮延迟网站加载? 但这是通过使用异步版本解决的,而我的正在使用此版本但仍然挂起?
如果有帮助,我可以发布一个指向它出现的我的网站/页面的链接吗?
I have implemented the Facebook like button on my site by using the asynchronous JS SDK and it's working great! However it takes a long time to load, which is not a great problem (Would be nicer if it loader quicker though..) as the rest of the page loads fine.
However, if your view the the site in any version of IE the whole page is unresponsive until Facebook Like / comments have loaded... All the images and other scripts are loaded, but the whole page is locked.
Any ideas on how i can rectify this for IE users?
I have seen this post: How do I keep the Facebook like button from delaying the loading on my website? but this was solved by using the Async version, where as mine IS using this and still hanging?
If it helps I can post a link to my site / page that it appears on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,我唯一的建议是将 FB JS 代码放在
标记之前。但总的来说,我对您的网站还有其他“提示”。
Well, my only advice here is to place your FB JS code just before the
</body>
tag. But I have other "tips" for your site in general.最后,IE 挂起,因为我对图像进行了 CSS3 转换,显然这会减慢 IE 的速度(即使它无法渲染转换)。所以我可以通过 CSS 中的条件注释或在我的例子中的 Modernizr 中禁用此功能。
In the end, IE was hanging because I had a CSS3 transform on my images and apparently this slows down IE (Even though it cannot render the transform. So i can disable by this via conditional comments in the CSS or in my case modernizr.