PC Review


Reply
Thread Tools Rate Thread

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

 
 
Pinakee
Guest
Posts: n/a
 
      10th Sep 2009
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.




 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      10th Sep 2009
On Sep 10, 10:09*am, Pinakee <Pina...@discussions.microsoft.com>
wrote:
> 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.


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...abWindows.aspx

Hope this helps
 
Reply With Quote
 
Pinakee
Guest
Posts: n/a
 
      10th Sep 2009
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.

"Alexey Smirnov" wrote:

> On Sep 10, 10:09 am, Pinakee <Pina...@discussions.microsoft.com>
> wrote:
> > 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.

>
> 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...abWindows.aspx
>
> Hope this helps
>

 
Reply With Quote
 
Andrew Morton
Guest
Posts: n/a
 
      10th Sep 2009
Pinakee wrote:
> 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


 
Reply With Quote
 
Pinakee
Guest
Posts: n/a
 
      10th Sep 2009
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.

"Andrew Morton" wrote:

> Pinakee wrote:
> > 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
>
>
>

 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      10th Sep 2009
On Sep 10, 11:57*am, Pinakee <Pina...@discussions.microsoft.com>
wrote:
> 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. ?
 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      10th Sep 2009
On Sep 10, 1:34*pm, Pinakee <Pina...@discussions.microsoft.com> wrote:
> 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.
>
>
>
> "Andrew Morton" wrote:
> > Pinakee wrote:
> > > 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- Hide quoted text -

>
> - Show quoted text -


I think it makes sense to prevent multiple windows in this case
 
Reply With Quote
 
Pinakee
Guest
Posts: n/a
 
      11th Sep 2009
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 ?

"Alexey Smirnov" wrote:

> On Sep 10, 11:57 am, Pinakee <Pina...@discussions.microsoft.com>
> wrote:
> > 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. ?
>

 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      11th Sep 2009
On Sep 11, 7:32*am, Pinakee <Pina...@discussions.microsoft.com> wrote:
> 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 ?
>
>
>
> "Alexey Smirnov" wrote:
> > On Sep 10, 11:57 am, Pinakee <Pina...@discussions.microsoft.com>
> > wrote:
> > > 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 theuser.

>
> > 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. ?- Hide quoted text -

>
> - 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.
 
Reply With Quote
 
Jesse Houwing
Guest
Posts: n/a
 
      14th Sep 2009
> "Alexey Smirnov" wrote:
>
>> On Sep 10, 11:57 am, Pinakee<Pina...@discussions.microsoft.com>
>> wrote:
>>> 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. ?
>>

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

--
Jesse Houwing
jesse.houwing at sogeti.nl
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I want to Open a Site in same browser Window using InternetExplorerClass Vicky_r Microsoft Dot NET 0 12th Jul 2006 02:56 PM
New web site does not open in my browser but does in others =?Utf-8?B?SmltIEhhbW1vbmQ=?= Windows XP Internet Explorer 1 22nd Jul 2005 03:35 PM
How do I get a new web browser to open from my web site =?Utf-8?B?SmF5?= Microsoft Frontpage 2 12th Jun 2005 04:31 PM
are there any add ons that let you open tabs in one browser for explorer? Tim Windows XP Internet Explorer 1 8th Oct 2004 12:32 AM
XP Pro Won't Open A Secure Site In Any Browser dvanderbl Windows XP Networking 1 1st Oct 2003 05:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:19 PM.