Reputation: 544
I want to know that if it is possible to detect how many tab are open in a browser window if I am on server side and want to detect whether the user using site hosted by my server has opened more than 1 tab (of some other site than hosted by my server ) in browser.
Upvotes: 0
Views: 1088
Reputation: 33399
It is only possible to keep track of how many times your site has been opened. Keep a cookie with the number of active tabs open. onload
, increment the number in the cookie. onunload
, decrement it. The server should then be able to read this cookie, and know how many instances are open.
Upvotes: 2