Ex. : If I have 10 tabs open of IE and 5 of them are having
"www.microsoft.com" open in them, my code should be able to show the count as
5.
If this is regarding how to detect and prevent multiple windows on
YOUR website, then please take a look at
http://www.codeproject.com/KB/aspnet/MultipleTabWindows.aspx
Hope this helps
What happens if the user loses network connectivity? How will you log them
out in that circumstance?
Andrew
First of all, you can't check in js if user has opened the same site
twice. And this makes no sense. Imagine, you have opened it twice and
wanted to close one of the window. Following your idea, you will be
automatically disconnected from the other window. ?
I think it makes sense to prevent multiple windows in this case
Theoretically, you can add a javascript to count a timeout on the
page. After 25-30 min it will show a popup: "Your session is about to
expire. Would you like to remain logged in?" If user clicked something
then he is still browsing the page, if not - you can "delete" the
session. If user opened two windows he will get this message twice. If
you don't like to show it twice, you can add an ajax call to get the
timeout value out of the server. You can save all active sessions in
the database and a time when each session was validate last time. It
means that once user clicked to continue the session you will save it
in the database and check it from another window using ajax.
No that is not possible. It would open IE up to a load of privacy issues
if it were. Especially now that every tab runs in it's own process,
things like this will become increasingly more difficult.
--
Jesse Houwing
jesse.houwing at sogeti.nl