473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Problem of user online/ offline status

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.
Dec 19 '07 #1
10 3600
rf

"Php Developer" <ph***************@gmail.comwrote in message
news:6f**********************************@s8g2000p rg.googlegroups.com...
>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.
Dec 19 '07 #2
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.
Dec 19 '07 #3
In article <80**********************************@s12g2000prg. googlegroups.com>, Php Developer <ph***************@gmail.comwrote:
>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.
Dec 19 '07 #4
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.
Dec 19 '07 #5
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.comwrote:
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.
Dec 19 '07 #6
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.comwrote:
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 -
Dec 19 '07 #7
On Dec 19, 2:02 pm, Php Developer <php.developer2...@gmail.comwrote:
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).
Dec 19 '07 #8
On Dec 19, 8:02 am, Php Developer <php.developer2...@gmail.comwrote:
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.comwrote:
>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.
Dec 19 '07 #9
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.comwrote:
>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 -
On Dec 19, 2:02 pm, Php Developer <php.developer2...@gmail.comwrote:
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
Ok, let's try a different tack; *why* do you want to know if a user is
"online" or "offline", and *what* are you going to use that
information for?
Dec 20 '07 #10
Hi,

"Php Developer" <ph***************@gmail.comwrote in message
news:6f**********************************@s8g2000p rg.googlegroups.com...
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.
Leaving reliability and cross-browser issues aside for a moment, Java
Applets (sometimes) give you start/stop and init/destroy event notification.

Could be worth a look?

Cheers Richard Maher
Dec 20 '07 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: NohaKhalifa | last post by:
Dear All; I'm developing a web site and i need to make adminisration for this site it's a site for Real Estates . But I don't need the administration to be online .. I want them to fill data...
1
by: Savas Ates | last post by:
i have table to understand which user is online or offline... when a user enter the system i check the my field as 1 when a user quit the site i want to make my field =0 for this i used...
1
by: Stefan Behrens | last post by:
Hi, i try get information about the online or offline status of a database within ms-sql srv 2000. I can look it up within server manager, but I'm looking for a way to get this information...
10
by: greenb | last post by:
Our asp.net web app uses a .NET component (DLL) in the bin directory to call several stored procedures back to back to perform updates. They don't return any data. Sometimes the total execution...
3
by: kotori | last post by:
I'm trying to develop a program in C# that will change 'label1' in my form to "online" if a server is present on 127.0.0.1:8080 and "offline" if it is not. I was playing around with this:...
7
by: giddy | last post by:
hi, i'm making a netowork based app. and if i have the UNC path to a local computer is there a way i can check whether the pc is online/offline?? Gideon
5
by: Michael M. | last post by:
I have the following code (listed at bottom of post) that pings a small range of IP address to see which ones are alive. To speed things up a little I am trying to use more than one thread,...
9
by: =?Utf-8?B?Sm9obiBBdXN0aW4=?= | last post by:
I have an app that prints entry tickets. If the printer driver is not set up exactly to detect the black mark on the back of the ticket, the tickets do not print correctly. Because of this, all...
3
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I want to limit the user only login the system one time at the same time. I don't want him login the system two with the same user at the same time. How to do this? If i have a table to record...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.