[英]How Do I know my site is not running on another tab in a same browser?
How Do I know my site is not running on another tab in a same browser? 我如何知道我的网站不在同一浏览器的另一个选项卡上运行? Any function or script exist which is give me how many tab has running my site in a same browser?
是否存在任何功能或脚本,这些功能或脚本可以让我在同一浏览器中运行多少个选项卡?
If at step 1. the cookie already exists then do what you need to do ;) 如果在步骤1. cookie已经存在,则执行您需要做的事情;)
Very basic and naive solution! 非常基本和天真的解决方案!
I think there is a way to do cross tab communication, but I can't remember what it's called... or maybe i'm dreaming. 我认为有一种方法可以进行跨选项卡通信,但是我不记得它的名字了……或者我在做梦。
Edit: The localStorage change event might also be of help 编辑: localStorage更改事件也可能有帮助
You could check is a session variable is set? 您可以检查是否设置了会话变量? this should pick up in the same browser different tab
这应该在同一浏览器的不同标签中显示
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.