How to counts the browser tabs having a particular site open ?

  • Thread starter Thread starter Pinakee
  • Start date Start date
P

Pinakee

How can I count the tabs of a browser having a particular site open ?

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.
 
No.
Actually we want to logout a user on closing of the browser. So, if at least
one of the tabs is having the site open, we'll not be signing out the user.
 
Pinakee said:
Actually we want to logout a user on closing of the browser. So, if
at least one of the tabs is having the site open, we'll not be
signing out the user.

What happens if the user loses network connectivity? How will you log them
out in that circumstance?

Andrew
 
There is a session checks for the user's existense. In case, one doesn't come
back within 30 min. we log of the user.
 
No.
Actually we want to logout a user on closing of the browser. So, if at least
one of the tabs is having the site open, we'll not be signing out the user.

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. ?
 
There is a session checks for the user's existense. In case, one doesn't come
back within 30 min. we log of the user.







- Show quoted text -

I think it makes sense to prevent multiple windows in this case
 
The basic aim is to check the browser tabs having a site open. If that can be
captured then a part of the problem will be solved.
Is that possible ?
 
The basic aim is to check the browser tabs having a site open. If that can be
captured then a part of the problem will be solved.
Is that possible ?






- Show quoted text -

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.
 
* Pinakee wrote, On 11-9-2009 7:32:
The basic aim is to check the browser tabs having a site open. If that can be
captured then a part of the problem will be solved.
Is that possible ?

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.
 
Back
Top