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

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.
 
P

Pinakee

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.
 
A

Andrew Morton

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
 
P

Pinakee

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.
 
G

Guest

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. ?
 
G

Guest

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
 
P

Pinakee

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 ?
 
G

Guest

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.
 
J

Jesse Houwing

* 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top