javascript 阻止了来源为“http://static.ak.facebook.com”的框架访问具有来源的框架
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17308330/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Blocked a frame with origin "http://static.ak.facebook.com" from accessing a frame with origin
提问by Kiko Mesquita
Suddenly starts to give this error :
突然开始出现这个错误:
Blocked a frame with origin "http://static.ak.facebook.com" from accessing a frame with origin "http://*****.com". The frame requesting access set "document.domain" to "facebook.com", but the frame being accessed did not. Both must set "document.domain" to the same value to allow access.
阻止了来源为“ http://static.ak.facebook.com”的框架访问来源为“http://*****.com”的框架。请求访问的框架将“document.domain”设置为“facebook.com”,但被访问的框架没有。两者都必须将“document.domain”设置为相同的值以允许访问。
采纳答案by John Doughty
In my experience it means you are running the iFrame somewhere that facebook can't access, like your local computer. Facebook trys to scan your page when your iFrame comes up. If your page is public, you wont get that error and the iFrame/facebook like plugin should work properly.
根据我的经验,这意味着您正在 facebook 无法访问的某个地方运行 iFrame,例如您的本地计算机。当您的 iFrame 出现时,Facebook 会尝试扫描您的页面。如果您的页面是公开的,则不会出现该错误,并且 iFrame/facebook 之类的插件应该可以正常工作。
回答by Aakil Fernandes
You have an iFrame from Facebook on your site. Some of the code on Facebook's end is trying to update your page. Your browser is blocking this behavior because the iFrame and your site are on different pages. The only way to get rid of this error is to get rid of the iFrame (unless you're friends with someone at Facebook).
您的网站上有来自 Facebook 的 iFrame。Facebook 端的一些代码正在尝试更新您的页面。您的浏览器阻止了此行为,因为 iFrame 和您的站点位于不同的页面上。摆脱这个错误的唯一方法是摆脱 iFrame(除非你是 Facebook 上的朋友)。