Ash*_*hir 4 html javascript iframe x-frame-options
我试图在一个只包含iframe的简单HTML页面中显示Facebook页面.
这是我的HTML代码:
<html>
<body>
<iframe src="http://www.facebook.com"></iframe>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我总是在谷歌Chrome控制台中收到此错误:
拒绝在一个框架中显示" http://www.facebook.com/ ",因为它将"X-Frame-Options"设置为"DENY".
顺便说一下,我对这些iframe也有这个问题:
<iframe src="https://mail.google.com/mail/mu/mp/any"></iframe>
<iframe src="http://m.facebook.com"></iframe>
<iframe src="http://m.youtube.com"></iframe>
<iframe src="http://m.dropbox.com"></iframe>
<iframe src="http://m.yahoo.com"></iframe>
<iframe src="http://www.google.com"></iframe>
<iframe src="http://mail.google.com"></iframe>
<iframe src="http://www.facebook.com"></iframe>
<iframe src="http://www.youtube.com"></iframe>
<iframe src="http://www.dropbox.com"></iframe>
<iframe src="http://www.yahoo.com"></iframe>
Run Code Online (Sandbox Code Playgroud)
同时,这个iframe运作良好!
<iframe src="http://www.google.com/custom"></iframe>
Run Code Online (Sandbox Code Playgroud)
怎么解决这个?
编辑基于评论:
如果这是无法解决的,是否有使用iframe的替代方法?像browser标签一样的东西XUL?我已经在Firefox扩展程序中尝试过浏览器标记,但它运行良好,但我现在正在编写一个chrome扩展,所以我不能再依赖于XUL了?
是的,你可以
| 归档时间: |
|
| 查看次数: |
19264 次 |
| 最近记录: |