【问题标题】:How does Facebook prevent you from putting the site into an iFrame?Facebook 如何阻止您将网站放入 iFrame?
【发布时间】:2012-02-22 17:44:59
【问题描述】:

以下代码不起作用。 Facebook 是如何做到这一点的?有什么办法吗?

<html>
<head></head>
<body>
  <iframe src="http://www.facebook.com" width="500" height="500">
</iframe>
</body>
</html>

【问题讨论】:

    标签: html facebook iframe


    【解决方案1】:

    他们这样做是为了避免诈骗和点击劫持。这是不可能做到的。这是一个不会出现在任何地方的安全功能......

    【讨论】:

      【解决方案2】:

      这是因为他们的源中有&lt;meta http-equiv="X-Frame-Options" content="deny" /&gt;。

      【讨论】:

      猜你喜欢
      • 2015-05-04
      • 1970-01-01
      • 1970-01-01
      • 2013-11-19
      • 2017-11-03
      • 2012-01-01
      • 1970-01-01
      • 2014-10-12
      • 1970-01-01
      相关资源
      最近更新 更多