如何防止其他网站将我的网页放入iframe? [英] How to prevent other websites putting my web page in their iframes?

查看:120
本文介绍了如何防止其他网站将我的网页放入iframe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

如何防止我的网站页面通过iFrame的第三方网站框架加载

如何阻止iframe通话

我不希望其他网站使用我的网站内容iframe

I don't want other website use my website content by iframe

推荐答案

使用 X-Frame-Options 响应标题,这将告诉浏览器是否应该在框架中显示网页。例如

Use X-Frame-Options response header, this will tell the browser wether it should show the webpage in a frame or not. E.g.

X-Frame-Options: SAMEORIGIN

这篇关于如何防止其他网站将我的网页放入iframe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆