我的网站它显示all.js
和__plusone.js
在 Chrome 和 Firefox 的 Web 开发者控制台中下载了两次。据我所知,它们在任何地方都没有两次包含在页面中,所以我不太确定发生了什么。
我使用 和 标记,因此它不是通过 iframe 下载的。 Facebook 通过该页面 min.js
脚本最底部的 window.fbasync = function() { load the js..}
异步加载。 G+只有页面底部的一个JS文件。
有什么想法吗?
My website it shows all.js
and __plusone.js
as downloading twice in both Chrome and Firefox's web developer consoles. As far as I can tell, they aren't included in the page twice anywhere, so I'm not really sure what's going on.
I use the <fb:like
and <g:plus
markup, so it's not being downloaded through an iframe. Facebook is loaded asynchronously with window.fbasync = function() { load the js..}
at the very bottom of the min.js
script on that page. G+ just has the one JS file at the bottom of the page.
Any ideas what's going on?
发布评论
评论(1)
当您添加 G+ 等时,会在页面内创建一个 iframe。看起来那些 iframe 正在引用这些文件。
an iframe is being created within the page when you add G+ and like. Looks like those iframes are referring to the files.