在iframe中嵌入网站
我试图将网站嵌入到iframe中以发布到我的网站上。但由于某种原因,我试图嵌入的网站无法正常工作。在iframe中嵌入网站
不工作(只显示空白页):
<iframe src="https://embeds.tagboard.com/newFLdriver/337842/" style="width: 100%; height: 5325px;" scrolling="no" frameborder="0"></iframe>
这个网站的工作原理:
<iframe src="https://www.w3schools.com" style="width: 100%; height: 5325px;" scrolling="no" frameborder="0"></iframe>
但是谷歌就不能工作。
任何帮助,将不胜感激!
https://embeds.tagboard.com/newFLdriver/337842/
拒绝嵌入到iframe中。
我的Chrome浏览器开发工具的控制台告诉我:
Refused to display ' https://embeds.tagboard.com/newFLdriver/337842/ ' in a frame because it set 'X-Frame-Options' to 'DENY'.
除此之外,我得到一个404,这可能是他们的行为。
有些网站不允许使用X-Policy。如果你检查控制台,你有这个错误:
拒绝在框架中显示'https://embeds.tagboard.com/newFLdriver/337842/',因为它将'X-Frame-Options'设置为'DENY'。
你可以阅读更多关于这个link:
The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a , or . Sites can use this to avoid clickjacking attacks, by ensuring that their content is not embedded into other sites.
定义 “不工作”。 – deceze
只显示空白页... –
在控制台中查看是否有错误。 –