PC Review


Reply
Thread Tools Rate Thread

How determine that the visitor is leave

 
 
Alexander Vasilevsky
Guest
Posts: n/a
 
      21st Jan 2008
How do you determine (on the client, on the server) that the visitor leave
the site?

http://www.alvas.net - Audio tools for C# and VB.Net developers


 
Reply With Quote
 
 
 
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      21st Jan 2008
"Alexander Vasilevsky" <(E-Mail Removed)> wrote in message
news:fn2pv5$28q0$(E-Mail Removed)...

> How do you determine (on the client, on the server) that the visitor leave
> the site?


There is no reliable way to do this due to the disconnected architecture of
the web...

A client sends a request to a server.
The server processes the request and sends a response back to the client.
The server has no knowledge of what happens after that until / unless it
receives another request from the same client.

There are suggested options using the onunload / onbeforeunload JavaScript
events, but they cannot be guaranteed to work either...

My advice would be don't even bother...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
David Thielen
Guest
Posts: n/a
 
      21st Jan 2008
You have to use the timeout event - there is no event when the client goes to
another site - so all you can do is say 10 minutes has passed, they must have
left.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




"Alexander Vasilevsky" wrote:

> How do you determine (on the client, on the server) that the visitor leave
> the site?
>
> http://www.alvas.net - Audio tools for C# and VB.Net developers
>
>
>

 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      21st Jan 2008
"David Thielen" <(E-Mail Removed)> wrote in message
news:734E25AB-AED8-45F8-ACD1-(E-Mail Removed)...

> You have to use the timeout event - there is no event when the client goes
> to
> another site - so all you can do is say 10 minutes has passed, they must
> have
> left.


There is no timeout event - sessions have a Timeout property after which the
Session_End event fires, but only if the site is using inproc sessions...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
Peter Bromberg [C# MVP]
Guest
Posts: n/a
 
      21st Jan 2008
I've tried things like calling to them ( "Vistor? Are you still there?") but
that doesn't seem to work either.

Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com


"Alexander Vasilevsky" wrote:

> How do you determine (on the client, on the server) that the visitor leave
> the site?
>
> http://www.alvas.net - Audio tools for C# and VB.Net developers
>
>
>

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      21st Jan 2008
You could have some fun and use "IsClientConnected" :

http://msdn2.microsoft.com/en-us/lib...connected.aspx

There's one thing I've never been able to figure out about IsClientConnected.
Isn't *being connected* a pre-requisite to it being used ?





Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Peter Bromberg [C# MVP]" <(E-Mail Removed)> wrote in message
news:4B3AC283-92F0-4201-9023-(E-Mail Removed)...
> I've tried things like calling to them ( "Vistor? Are you still there?") but
> that doesn't seem to work either.
>
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> MetaFinder: http://www.blogmetafinder.com
>
>
> "Alexander Vasilevsky" wrote:
>
>> How do you determine (on the client, on the server) that the visitor leave
>> the site?
>>
>> http://www.alvas.net - Audio tools for C# and VB.Net developers
>>
>>
>>




 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      22nd Jan 2008
AFAIK. it just allows to see if the destination of the current HTTP response
is still connected. For example if a user triggers a long running page and
closes its browser (or just goes on another page on the same site), my
understanding is that IsClientConnected will be false as the network link
between the server sending the response and the "destination" of this
response is broken.

It just allows to see if the response that is currently sent has a receiver
on the other side of the network link

--
Patrice

"Juan T. Llibre" <(E-Mail Removed)> a écrit dans le message de
news: (E-Mail Removed)...
> You could have some fun and use "IsClientConnected" :
>
> http://msdn2.microsoft.com/en-us/lib...connected.aspx
>
> There's one thing I've never been able to figure out about
> IsClientConnected.
> Isn't *being connected* a pre-requisite to it being used ?
>
>
>
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en español : http://asp.net.do/foros/
> ======================================
> "Peter Bromberg [C# MVP]" <(E-Mail Removed)> wrote in
> message
> news:4B3AC283-92F0-4201-9023-(E-Mail Removed)...
>> I've tried things like calling to them ( "Vistor? Are you still there?")
>> but
>> that doesn't seem to work either.
>>
>> Site: http://www.eggheadcafe.com
>> UnBlog: http://petesbloggerama.blogspot.com
>> MetaFinder: http://www.blogmetafinder.com
>>
>>
>> "Alexander Vasilevsky" wrote:
>>
>>> How do you determine (on the client, on the server) that the visitor
>>> leave
>>> the site?
>>>
>>> http://www.alvas.net - Audio tools for C# and VB.Net developers
>>>
>>>
>>>

>
>
>



 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      22nd Jan 2008
re:
!> AFAIK. it just allows to see if the destination of the current HTTP response is still connected

I'm well aware of that.

I'll also bet that 99.9999% of all clients are still connected when IsClientConnected is used.
After all, IsClientConnected is checked only in response to a client request for a page.

Most page processing, btw, takes very little time.

A client would have to have very nimble fingers to close the browser
or move to another page before his latest request is fulfilled.

The intended purpose, of course, is to save server resources by not continuing
to process a request which will have no destination, but it seems to me that
IsClientConnected takes up a lot of server resources by itself.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Patrice" <http://www.chez.com/scribe/> wrote in message news:(E-Mail Removed)...
> AFAIK. it just allows to see if the destination of the current HTTP response is still connected. For example if a user
> triggers a long running page and closes its browser (or just goes on another page on the same site), my understanding
> is that IsClientConnected will be false as the network link between the server sending the response and the
> "destination" of this response is broken.
>
> It just allows to see if the response that is currently sent has a receiver on the other side of the network link
>
> --
> Patrice
>
> "Juan T. Llibre" <(E-Mail Removed)> a écrit dans le message de news: (E-Mail Removed)...
>> You could have some fun and use "IsClientConnected" :
>>
>> http://msdn2.microsoft.com/en-us/lib...connected.aspx
>>
>> There's one thing I've never been able to figure out about IsClientConnected.
>> Isn't *being connected* a pre-requisite to it being used ?
>>
>>
>>
>>
>>
>> Juan T. Llibre, asp.net MVP
>> asp.net faq : http://asp.net.do/faq/
>> foros de asp.net, en español : http://asp.net.do/foros/
>> ======================================
>> "Peter Bromberg [C# MVP]" <(E-Mail Removed)> wrote in message
>> news:4B3AC283-92F0-4201-9023-(E-Mail Removed)...
>>> I've tried things like calling to them ( "Vistor? Are you still there?") but
>>> that doesn't seem to work either.
>>>
>>> Site: http://www.eggheadcafe.com
>>> UnBlog: http://petesbloggerama.blogspot.com
>>> MetaFinder: http://www.blogmetafinder.com
>>>
>>>
>>> "Alexander Vasilevsky" wrote:
>>>
>>>> How do you determine (on the client, on the server) that the visitor leave
>>>> the site?
>>>>
>>>> http://www.alvas.net - Audio tools for C# and VB.Net developers
>>>>
>>>>
>>>>

>>
>>
>>

>
>



 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      22nd Jan 2008
Wanted to mention this to point out that this is unlikely to solve the OP
problem... IMO the OP best bet would be to explain what he wants to do i.e.
why he needs to track down leaving visitors.

For example in most cases, it's likely the current user count seen on some
site is just an approximation. If this is for cleanup, cleanup could likely
be done another way etc.. etc...

--
Patrice

"Juan T. Llibre" <(E-Mail Removed)> a écrit dans le message de
news: (E-Mail Removed)...
> re:
> !> AFAIK. it just allows to see if the destination of the current HTTP
> response is still connected
>
> I'm well aware of that.
>
> I'll also bet that 99.9999% of all clients are still connected when
> IsClientConnected is used.
> After all, IsClientConnected is checked only in response to a client
> request for a page.
>
> Most page processing, btw, takes very little time.
>
> A client would have to have very nimble fingers to close the browser
> or move to another page before his latest request is fulfilled.
>
> The intended purpose, of course, is to save server resources by not
> continuing
> to process a request which will have no destination, but it seems to me
> that
> IsClientConnected takes up a lot of server resources by itself.
>
>
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en español : http://asp.net.do/foros/
> ======================================
> "Patrice" <http://www.chez.com/scribe/> wrote in message
> news:(E-Mail Removed)...
>> AFAIK. it just allows to see if the destination of the current HTTP
>> response is still connected. For example if a user triggers a long
>> running page and closes its browser (or just goes on another page on the
>> same site), my understanding is that IsClientConnected will be false as
>> the network link between the server sending the response and the
>> "destination" of this response is broken.
>>
>> It just allows to see if the response that is currently sent has a
>> receiver on the other side of the network link
>>
>> --
>> Patrice
>>
>> "Juan T. Llibre" <(E-Mail Removed)> a écrit dans le message de
>> news: (E-Mail Removed)...
>>> You could have some fun and use "IsClientConnected" :
>>>
>>> http://msdn2.microsoft.com/en-us/lib...connected.aspx
>>>
>>> There's one thing I've never been able to figure out about
>>> IsClientConnected.
>>> Isn't *being connected* a pre-requisite to it being used ?
>>>
>>>
>>>
>>>
>>>
>>> Juan T. Llibre, asp.net MVP
>>> asp.net faq : http://asp.net.do/faq/
>>> foros de asp.net, en español : http://asp.net.do/foros/
>>> ======================================
>>> "Peter Bromberg [C# MVP]" <(E-Mail Removed)> wrote in
>>> message
>>> news:4B3AC283-92F0-4201-9023-(E-Mail Removed)...
>>>> I've tried things like calling to them ( "Vistor? Are you still
>>>> there?") but
>>>> that doesn't seem to work either.
>>>>
>>>> Site: http://www.eggheadcafe.com
>>>> UnBlog: http://petesbloggerama.blogspot.com
>>>> MetaFinder: http://www.blogmetafinder.com
>>>>
>>>>
>>>> "Alexander Vasilevsky" wrote:
>>>>
>>>>> How do you determine (on the client, on the server) that the visitor
>>>>> leave
>>>>> the site?
>>>>>
>>>>> http://www.alvas.net - Audio tools for C# and VB.Net developers
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>

>>
>>

>
>



 
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
Visitor IP Address PP Microsoft ASP .NET 1 6th Jan 2010 02:33 PM
10,000 visitor George-NY Windows XP General 4 20th Apr 2009 10:02 PM
Leave/do not leave message on server Kalevi Microsoft Outlook 2 13th Sep 2006 01:55 PM
Determine Staff Leave pete.trudell@twc.state.tx.us Microsoft Access 0 21st Dec 2004 09:45 PM
How to allow a visitor to print on our LAN? Adrian Waters Microsoft Windows 2000 Printing 3 11th May 2004 10:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:48 AM.