admin管理员组文章数量:1391030
I need to check, if website in iframe
is loaded properly. On my website, users can POST
custom website, which will show them in iframe. But some websites are protected from insert to iframe (such as google or facebook).
How can I check, if is website loadable in iframe and can be used in iframe?
PS: I haven't show any code, because I have no code and no idea how to do it. (My website runs on Java, so no Apache or PHP).
I need to check, if website in iframe
is loaded properly. On my website, users can POST
custom website, which will show them in iframe. But some websites are protected from insert to iframe (such as google or facebook).
How can I check, if is website loadable in iframe and can be used in iframe?
PS: I haven't show any code, because I have no code and no idea how to do it. (My website runs on Java, so no Apache or PHP).
Share Improve this question edited May 12, 2014 at 7:26 Chankey Pathak 21.7k12 gold badges88 silver badges136 bronze badges asked May 12, 2014 at 6:59 Patrik KrehákPatrik Krehák 2,6838 gold badges35 silver badges63 bronze badges 3- See this: stackoverflow./a/21263774/1355315 – Abhitalks Commented May 12, 2014 at 7:23
- possible duplicate of Detect X-Frame-Options – Farid Nouri Neshat Commented May 12, 2014 at 8:50
- BTW, how can you flag this as duplicate, when I am not running on PHP? – Patrik Krehák Commented May 20, 2014 at 8:37
1 Answer
Reset to default 4Check HTTP response header for X-Frame-Options. Facebook sends X-Frame-Options=DENY, which means "The page cannot be displayed in a frame, regardless of the site attempting to do so."
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
<frame>
,<iframe>
or<object>
. Sites can use this to avoid clickjacking attacks, by ensuring that their content is not embedded into other sites.
Check this: Accessing the web page's HTTP Headers in JavaScript
本文标签: javascriptHow to check if website is loadable in iframeStack Overflow
版权声明:本文标题:javascript - How to check if website is loadable in iframe - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744637359a2616903.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论