Is there any way to check that my page is not opened in another tab or window in IE? Say I have Page1 and user hits "new window", which will open a new window with the same page opened. So now there are two instances of the page. I want to restrict the browser to only have one instance of the page opened at any given time.
One of the requirements is that users must be able to refresh the page and still be in the same state inside the application. So one-time tokens are not suitable.
Not sure that there is any way to distinguish between a page refresh and a new window opened, that's why I'm asking.
P.S. This is not for a normal website, and I understand that doing this usually would be intrusive and evil. There is a strong case to do this here, as it is a massive web application.
The best way to implement this is by having a server side token (many banks do this) that is regenerated at each request and must be passed back for the pages to function.
So basically:
Easy way to do it is to use windowName
window.open(windowURL, windowName, windowFeatures);
assign it somethign unique and check it when the link is clicked to make sure that hasn't been open already.
this guy explains it realy good. - http://www.joemarini.com/tutorials/tutorialpages/window1.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With