Brian is correct, have your application implement Window.ClosingHandler
and/or Window.CloseHandler in order to do any clean up work when the user
navigates away from your site.
Keep in mind that:1. These events are called when the user closes the
browser or tab as well as when the user navigates away from your site.
2. No user-interface components may be displayed during this event (see link
below).

Instead of displaying UI during close, you may want to consider cleaning up
any session data and having the user re-authenticate when they return.

ClosingHandler interface JavaDoc:
http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/client/Window.ClosingHandler.html

- Chris

On Wed, Oct 7, 2009 at 3:17 PM, Brian Blain <bbla...@gmail.com> wrote:

>
> Maybe Window.addWindowClosingHandler or Window.addCloseHandler
>
>
> On Oct 7, 11:35 am, francescoNemesi <nem...@yahoo.com> wrote:
> > Hi,
> >
> > is there a way to listen to a browser window or unload event? I want
> > to force a logout (to clean up session memory on the server as well as
> > much as I can on the client) if the user forgets to logout explicitly
> > before closing the browser or navigating to another page.
> >
> > Thanks,
> > F
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to