[英]how to Avoid open the same window twice in a new tab in c#
How to avoid to open same window of existing website(window) in new tab 如何避免在新标签页中打开现有网站的相同窗口(窗口)
for eg.. if i have a page www.mysite.com/page1.aspx if i copy this URL and paste in new tab of the browser than a popup or message should be appear(alert-- you have already open this website) 例如..如果我有一个页面www.mysite.com/page1.aspx,如果我复制此URL并粘贴到浏览器的新选项卡中,则弹出窗口或消息应该会出现(提醒-您已经打开了此网站)
Note: if we reload or refresh the previous page than alter should not be appear .means only one page can be open at a time 注意:如果我们重新加载或刷新上一页,则不应显示alter。一次仅意味着可以打开一个页面
It should be done in scripting only, i need your valuable advice thanks in advance 应该只在脚本中完成,我需要您的宝贵建议,在此先感谢
Create a cookie, set its value to true on page load and false on log off. 创建一个cookie,在页面加载时将其值设置为true,在注销时将其值设置为false。 check if a cookie is true and same page loaded show your message. 检查Cookie是否为true,并且加载的同一页面显示您的消息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.