iframe有什么方法绕过'X-Frame-Options' to 'DENY'吗 ?

<html>
<head>
<style>
body {margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;overflow: hidden;}
</style>
</head>
<body>
<iframe src="https://www.zhihu.com/question/56559215/answer/150011133" width='100%' height='100%' frameborder='0' name="_blank" id="_blank" ></iframe>
<div>
</div>
</body>
</html>

图片描述
因为用iframe嵌入别人的网页还是有很多其他的问题,那么有其他方式实现把别人的网页嵌入到自己的网页里面去吗?

阅读 16.6k
2 个回答

跳转吧~

<httpProtocol>
  <customHeaders>
    <add name="X-Frame-Options" value="DENY" />
  </customHeaders>
</httpProtocol>

同域都不能用frame, 更何况你的不同域呢...

写个代理程序过滤。

话说别人都不让 iframe 了,你还非得弄进来,这样不好。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题