I am a magento 2 enterpise edition developer. How can we prevent the users of a store from having the store window open in his/her browser's multiple tab?. We must make sure that the user cant use the website on 2 different windows of the same browser. We do not have user registrations, all our customers do purchase anonymously.
Is there any magento api available to do it? If there is not, please suggest a best way to do this....
Why would you want to do this? Is there something you re trying to stop?
Restricting the use of multiple tabs is quite a difficult task and I am not sure there is a gold solution. The tabs are created in the browser application and webservers have no concept of what they are. It will just keep accepting new sessions.
The only other way I can think to achieve this is by using a cookie to set a session ID. This cookie could then be used to to append to the end of the URL and then it doesn't matter how many tabs are open as the session could be used to identify the user. Not 100% sure how you would implement this though and it could also be circumvented by using private browsing or similar.