finding out if a user left our website ?
finding out if a user left our website ?
am 25.08.2010 22:32:21 von Vinay Kannan
--00163630f2eb560fea048eabc7ef
Content-Type: text/plain; charset=ISO-8859-1
Hello Guys,
Wanted to know if there is a way for us to find out, when a user moves away
from our website( closing the window and entering a different url in the
address bar )
closing the window i guess, we could use the javascript onclose or something
similar but for the user moving away from my website by entering a different
URL is what i would like to be able to find out.
Thanks,
Vinay
--00163630f2eb560fea048eabc7ef--
RE: finding out if a user left our website ?
am 25.08.2010 23:21:05 von Daevid Vincent
> -----Original Message-----
> From: Vinay Kannan [mailto:vinykan@gmail.com]
>
> Wanted to know if there is a way for us to find out, when a
> user moves away
> from our website( closing the window and entering a different
> url in the address bar )
>
> closing the window i guess, we could use the javascript
> onclose or something
> similar but for the user moving away from my website by
> entering a different URL is what i would like to be
> able to find out.
Yeah. You and everyone else on the web... ;-)
Not possible really. The web (by design) is stateless. This is the same
reason that you can't cancel a long running mySQL query if someone hits
"Stop" in the browser or leaves the page (and your mySQL server will
happily keep churning away and then try to return the data to a
non-existant page). It's sort of a "fire and forget" system.
Best you can hope for is to keep updating a timestamp to know how long
they've been there (and an auto-logout after some amount of inactivity).
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: finding out if a user left our website ?
am 25.08.2010 23:21:51 von Karl DeSaulniers
I think you can do that with window.focus in javascript.
Karl
On Aug 25, 2010, at 3:32 PM, Vinay Kannan wrote:
> Hello Guys,
>
> Wanted to know if there is a way for us to find out, when a user
> moves away
> from our website( closing the window and entering a different url
> in the
> address bar )
>
> closing the window i guess, we could use the javascript onclose or
> something
> similar but for the user moving away from my website by entering a
> different
> URL is what i would like to be able to find out.
>
> Thanks,
> Vinay
Karl DeSaulniers
Design Drumm
http://designdrumm.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: finding out if a user left our website ?
am 25.08.2010 23:54:04 von Kesavan Rengarajan
--0016368e226d96a07a048eacebc7
Content-Type: text/plain; charset=ISO-8859-1
Have a look at this: https://developer.mozilla.org/en/DOM/window.onunload
But, as someone
pointed out a few days ago, please do not post stuff that is not related to
PHP DB.
On Thu, Aug 26, 2010 at 6:32 AM, Vinay Kannan wrote:
> Hello Guys,
>
> Wanted to know if there is a way for us to find out, when a user moves away
> from our website( closing the window and entering a different url in the
> address bar )
>
> closing the window i guess, we could use the javascript onclose or
> something
> similar but for the user moving away from my website by entering a
> different
> URL is what i would like to be able to find out.
>
> Thanks,
> Vinay
>
--0016368e226d96a07a048eacebc7--
RE: finding out if a user left our website ?
am 26.08.2010 00:16:17 von Daevid Vincent
Well look at that. Check out this one too:
"window.onbeforeunload"
http://www.hunlock.com/blogs/Mastering_The_Back_Button_With_ Javascript
> -----Original Message-----
> From: kesavan trichy rengarajan [mailto:k7@trk7.com]
> Sent: Wednesday, August 25, 2010 2:54 PM
> To: Vinay Kannan
> Cc: PHP DB
> Subject: Re: [PHP-DB] finding out if a user left our website ?
>
> Have a look at this:
> https://developer.mozilla.org/en/DOM/window.onunload
>
> But, as someone
> pointed out a few days ago, please do not post stuff that is
> not related to
> PHP DB.
>
> On Thu, Aug 26, 2010 at 6:32 AM, Vinay Kannan
> wrote:
>
> > Hello Guys,
> >
> > Wanted to know if there is a way for us to find out, when a
> user moves away
> > from our website( closing the window and entering a
> different url in the
> > address bar )
> >
> > closing the window i guess, we could use the javascript onclose or
> > something
> > similar but for the user moving away from my website by entering a
> > different
> > URL is what i would like to be able to find out.
> >
> > Thanks,
> > Vinay
> >
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: finding out if a user left our website ?
am 27.08.2010 15:17:57 von Martin Zvarik
Dne 25.8.2010 22:32, Vinay Kannan napsal(a):
> Hello Guys,
>
> Wanted to know if there is a way for us to find out, when a user moves away
> from our website( closing the window and entering a different url in the
> address bar )
>
> closing the window i guess, we could use the javascript onclose or something
> similar but for the user moving away from my website by entering a different
> URL is what i would like to be able to find out.
>
> Thanks,
> Vinay
>
Hi,
you can use: window.onunload function()
In this function you can add an AJAX that sends a server request that
the user left.
I used it for administration and it worked in 80% of cases - sometimes
the request is just not sent.
Martin
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: finding out if a user left our website ?
am 27.08.2010 20:16:05 von Vinay Kannan
--0016e6460832b3cfe9048ed21b0e
Content-Type: text/plain; charset=ISO-8859-1
Thank you everyone window.onunload() function works perfect, thats what I
was looking for !!
Thanks,
Vinay Kannan.
On Thu, Aug 26, 2010 at 3:24 AM, kesavan trichy rengarajan wrote:
> Have a look at this: https://developer.mozilla.org/en/DOM/window.onunload
>
> But, as someone
> pointed out a few days ago, please do not post stuff that is not related to
> PHP DB.
>
>
> On Thu, Aug 26, 2010 at 6:32 AM, Vinay Kannan wrote:
>
>> Hello Guys,
>>
>> Wanted to know if there is a way for us to find out, when a user moves
>> away
>> from our website( closing the window and entering a different url in the
>> address bar )
>>
>> closing the window i guess, we could use the javascript onclose or
>> something
>> similar but for the user moving away from my website by entering a
>> different
>> URL is what i would like to be able to find out.
>>
>> Thanks,
>> Vinay
>>
>
>
--0016e6460832b3cfe9048ed21b0e--