You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Vinicius Carvalho <ja...@gmail.com> on 2006/09/04 14:49:57 UTC

[OT] - Window Events question

Hello there. This is slightly OT, but since we have many gurus from JS
here like Jesse. I was wondering if you guys don't mind if I post this
here :)

My app will have some thousand of simultaneous users, using ajax that
polls messages from the chatserver with a 2sec interval.

Well, one of the problems I'm facing is how to know when the user is
still on the room. I'm already using window.onclose events, that sends
a message to the server, and remove him from the userList. But I have
2 other problems:

1st: the user hits the back/forward button
2nd: the user change the location on the browser.

Is it possible to detect this kind of behaviour ?
Best Regards

Vinicius

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [OT] - Window Events question

Posted by Vinicius Carvalho <ja...@gmail.com>.
Thanks :) That did the trick :)

On 9/4/06, andyhot <an...@di.uoa.gr> wrote:
> try onunload
>
> Vinicius Carvalho wrote:
> > Hello there. This is slightly OT, but since we have many gurus from JS
> > here like Jesse. I was wondering if you guys don't mind if I post this
> > here :)
> >
> > My app will have some thousand of simultaneous users, using ajax that
> > polls messages from the chatserver with a 2sec interval.
> >
> > Well, one of the problems I'm facing is how to know when the user is
> > still on the room. I'm already using window.onclose events, that sends
> > a message to the server, and remove him from the userList. But I have
> > 2 other problems:
> >
> > 1st: the user hits the back/forward button
> > 2nd: the user change the location on the browser.
> >
> > Is it possible to detect this kind of behaviour ?
> > Best Regards
> >
> > Vinicius
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [OT] - Window Events question

Posted by andyhot <an...@di.uoa.gr>.
try onunload

Vinicius Carvalho wrote:
> Hello there. This is slightly OT, but since we have many gurus from JS
> here like Jesse. I was wondering if you guys don't mind if I post this
> here :)
>
> My app will have some thousand of simultaneous users, using ajax that
> polls messages from the chatserver with a 2sec interval.
>
> Well, one of the problems I'm facing is how to know when the user is
> still on the room. I'm already using window.onclose events, that sends
> a message to the server, and remove him from the userList. But I have
> 2 other problems:
>
> 1st: the user hits the back/forward button
> 2nd: the user change the location on the browser.
>
> Is it possible to detect this kind of behaviour ?
> Best Regards
>
> Vinicius
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org