如何防止将我的网页嵌入到iframe中? [英] How to prevent embedding my web page inside an iframe?

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

问题描述


可能存在重复:

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


如何防止他人将我的网页嵌入到iframe中?


另一个解决方案:

  if(window.top! == window.self)window.top.location.replace(window.self.location.href); 


Possible Duplicate:
How to prevent my site page to be loaded via 3rd party site frame of iFrame

How can I prevent others from embedding my web page inside an iframe?

解决方案

Another solution:

if (window.top !== window.self) window.top.location.replace(window.self.location.href);

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

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