在我的应用程序中,我打开我的应用程序页面在子窗口中。当我在IE中查看这些内容时,它没有显示任何URL,但是当我在Firefox和Chrome中查看它时,我显示了URL。如何防止父窗口中的URL副本
我的问题是我可以隐藏地址栏在儿童窗口的Firefox和铬。
我想阻止用户在父窗口中复制粘贴URL并访问页面。
我米使用形式验证
<authentication mode="Forms">
<forms loginUrl="~/login.aspx" protection="All" timeout="3600" name=".ASPXAUTH" path="/" requireSSL="false" slidingExpiration="true" cookieless="UseUri" enableCrossAppRedirects="false"/>
</authentication>
我已经使用授权尝试= “?” 我曾尝试使用JavaScript来检查这是父窗口还是子窗口。
<script type="text/javascript">
if (typeof window.opener != "undefined")
alert("I was opened from within " + window.opener.location.href);
else if (window != top)
alert("You came here from " + document.referrer);
</script>
但第二部分不起作用。 请帮助我,让我知道我做错了什么
我该怎么办。 – Apus
检查编辑后 –