【问题标题】:Certain sites are not loading in iFrame某些网站未在 iFrame 中加载
【发布时间】:2018-09-18 08:32:01
【问题描述】:

我尝试在 iframe 中打开某些网站,但我的浏览器没有加载这些网站。我的源代码是

<html>
  <body>
    <iframe src="http://www.microsoft.com">
      <p> Your browser does not support iframes. </p>
    </iframe>
  </body>
</html>

这个 sn-p 工作正常,它在 iFrame 中加载 microsoft.com,但是当我将 src 更改为 http://www.amazon.com 时,它不会在 iFrame 中加载 amazon.com。我不确定为什么会发生这种情况,是否有任何可用的解决方案。

问候, 亚历克斯

【问题讨论】:

标签: html iframe


【解决方案1】:

它不会显示给你

拒绝在框架中显示“http://www.amazon.com/”,因为它将“X-Frame-Options”设置为“SAMEORIGIN”。

因为

it set 'X-Frame-Options' to 'SAMEORIGIN'.

请详细了解 X-Frame-Options here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-11-11
    • 1970-01-01
    • 1970-01-01
    • 2012-11-03
    • 1970-01-01
    • 1970-01-01
    • 2015-08-27
    相关资源
    最近更新 更多