Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Problem of user online/ offline status

Reply
Thread Tools

Problem of user online/ offline status

 
 
Php Developer
Guest
Posts: n/a
 
      12-19-2007
I want to know how to check that user is online or offline status if
he close his browser with the help of <body onunload>.As it not work
well if is user change his page as that time it is too fired.I want
only to fire function if user closed browser.
 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      12-19-2007

"Php Developer" <> wrote in message
news:6f4a82fd-ee35-4323-957c-...
>I want to know how to check that user is online or offline status if
> he close his browser with the help of <body onunload>.As it not work
> well if is user change his page as that time it is too fired.I want
> only to fire function if user closed browser.


Er, what? Google grouper, figures.

In any case you can not reliably know when a viewer "stops" looking at your
page. onunload does not work - what if they simply pull the plug on their
computer or wander off down to the pub?

This is asked frequently. Google.

--
Richard.


 
Reply With Quote
 
 
 
 
Php Developer
Guest
Posts: n/a
 
      12-19-2007
Hi,
What i need some help to make it work if possible any ways pls tell
Thanks
> >I want to know how to check that user is online or offline status if
> > he close his browser with the help of <body onunload>.As it not work
> > well if is user change his page as that time it is too fired.I want
> > only to fire function if user closed browser.

 
Reply With Quote
 
Doug Miller
Guest
Posts: n/a
 
      12-19-2007
In article <8040f325-3e23-47cd-b89e->, Php Developer <> wrote:
>Hi,
>What i need some help to make it work if possible any ways pls tell


What part of 'you can not reliably know when a viewer stops looking at your
page' did you not understand?

> Thanks
>> >I want to know how to check that user is online or offline status if
>> > he close his browser with the help of <body onunload>.As it not work
>> > well if is user change his page as that time it is too fired.I want
>> > only to fire function if user closed browser.

 
Reply With Quote
 
seani
Guest
Posts: n/a
 
      12-19-2007
On Dec 19, 12:41 pm, Php Developer <php.developer2...@gmail.com>
wrote:
> I want to know how to check that user is online or offline status if
> he close his browser with the help of <body onunload>.As it not work
> well if is user change his page as that time it is too fired.I want
> only to fire function if user closed browser.


It is impossible to /reliably/ get this information in the way you
want it. But what you're asking for also seems illogical. The fact
that the user has browser away from your page is the *only* indicator
you have. And that isn't reliable - what if the process is killed, or
the connection is dropped by the ISP, or the user has more then one
browser instance at a time open? These conditions all subvert the
notion of being "online" or "offline" as far as your question goes.
 
Reply With Quote
 
Php Developer
Guest
Posts: n/a
 
      12-19-2007
Hi,
I know maybe i m not asking unreliable thing but i want a way to make
it work if you know better way thn that then tell.As orkut and
facebook are using this things..
Thanks
On Dec 19, 6:53 pm, seani <ingl...@gmail.com> wrote:
> On Dec 19, 12:41 pm, Php Developer <php.developer2...@gmail.com>
> wrote:
>
> > I want to know how to check that user is online or offline status if
> > he close his browser with the help of <body onunload>.As it not work
> > well if is user change his page as that time it is too fired.I want
> > only to fire function if user closed browser.

>
> It is impossible to /reliably/ get this information in the way you
> want it. But what you're asking for also seems illogical. The fact
> that the user has browser away from your page is the *only* indicator
> you have. And that isn't reliable - what if the process is killed, or
> the connection is dropped by the ISP, or the user has more then one
> browser instance at a time open? These conditions all subvert the
> notion of being "online" or "offline" as far as your question goes.


 
Reply With Quote
 
Php Developer
Guest
Posts: n/a
 
      12-19-2007
Hi,
I know maybe i m not asking unreliable thing but i want a way to make
it work if you know better way thn that then tell.As orkut and
facebook are using this things..
Thanks



On Dec 19, 6:50 pm, spamb...@milmac.com (Doug Miller) wrote:
> In article <8040f325-3e23-47cd-b89e-e029c53a4...@s12g2000prg.googlegroups.com>, Php Developer <php.developer2...@gmail.com> wrote:
>
> >Hi,
> >What i need some help to make it work if possible any ways pls tell

>
> What part of 'you can not reliably know when a viewer stops looking at your
> page' did you not understand?
>
>
>
> > Thanks
> >> >I want to know how to check that user is online or offline status if
> >> > he close his browser with the help of <body onunload>.As it not work
> >> > well if is user change his page as that time it is too fired.I want
> >> > only to fire function if user closed browser.- Hide quoted text -

>
> - Show quoted text -


 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      12-19-2007
On Dec 19, 2:02 pm, Php Developer <php.developer2...@gmail.com> wrote:
> I know maybe i m not asking unreliable thing but i want a way to make
> it work


It isn't possible, as you've been told several times.

> if you know better way thn that then tell.As orkut and
> facebook are using this things..


Then they lie. The closest you can come is "The user access a page X
seconds ago, they might still be online" (and that involves something
on the server, which could be JavaScript, but probably isn't).
 
Reply With Quote
 
Doug Gunnoe
Guest
Posts: n/a
 
      12-19-2007
On Dec 19, 8:02 am, Php Developer <php.developer2...@gmail.com> wrote:
> Hi,
> I know maybe i m not asking unreliable thing but i want a way to make
> it work if you know better way thn that then tell.As orkut and
> facebook are using this things..
> Thanks
>
> On Dec 19, 6:50 pm, spamb...@milmac.com (Doug Miller) wrote:
>
>
>
> > In article <8040f325-3e23-47cd-b89e-e029c53a4...@s12g2000prg.googlegroups.com>, Php Developer <php.developer2...@gmail.com> wrote:

>
> > >Hi,
> > >What i need some help to make it work if possible any ways pls tell

>
> > What part of 'you can not reliably know when a viewer stops looking at your
> > page' did you not understand?

>
> > > Thanks
> > >> >I want to know how to check that user is online or offline status if
> > >> > he close his browser with the help of <body onunload>.As it not work
> > >> > well if is user change his page as that time it is too fired.I want
> > >> > only to fire function if user closed browser.- Hide quoted text -

>
> > - Show quoted text -- Hide quoted text -

>
> - Show quoted text -


facebook is probably just checking that the person is logged in. If
logged in, then they say they're "online". They do this with cookies.
And they probably don't use javascript for this, but some server side
stuff (php, for example) like David mentioned.
 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      12-19-2007
David Dorward wrote:
> On Dec 19, 2:02 pm, Php Developer <php.developer2...@gmail.com> wrote:
>> I know maybe i m not asking unreliable thing but i want a way to make
>> it work

>
> It isn't possible, as you've been told several times.


Is it possible? -- Yes. Is it reliable? -- No.

>> if you know better way thn that then tell.As orkut and
>> facebook are using this things..

>
> Then they lie. The closest you can come is "The user access a page X
> seconds ago, they might still be online" (and that involves something
> on the server, which could be JavaScript, but probably isn't).


If the application depended on XHR, XHR could also be used to determine
whether or not a request could be made to the same document resource. If
it threw an exception on an otherwise proper XHR:pen() call, then one
could assume that the client was offline, and if it did not, that it was online.


PointedEars
--
"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
can I use more than one status condition name in imaplib.status() harryos Python 0 10-13-2010 01:37 PM
status info like rc.status Sven S. Ruby 2 12-11-2008 08:26 AM
Recommend a free 'Status Monitor' or 'Dashboard' to report overnight tasks status? Shug Java 13 12-15-2006 06:22 PM
Recommend a free 'Status Monitor' or 'Dashboard' to report overnight tasks status? Shug C++ 13 12-15-2006 06:22 PM
POST problem - IIS sc-win32-status:64; sc-status:400 saha ASP .Net 0 07-14-2005 07:10 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57