GWT detect browser refresh in CloseHandler?

I am thinking that if you defined a map "hash" (i.e. A javascript pseudo hash) in the hosting file and then accessed the "hash" in GWT through Dictionary class, you could update values in that hash as the user progresses through the gwt app. Which means, your programming style would require you to log milestones on the user's progress onto this map.

When the user closes the browser page, the onunload script of the launching html page would be triggered. That script would access the map to figure out what needs to be updated to the server, or what other url to launch.

I am intereted too if someone got a solution (GWT/java side only). Maybe we can do it with 1-set a flag for your current viewing page. 2-when ClosingHandler event, launch a "timeout" on server-side (for example 10s) 3-if during this time your got a massage from storyListerner with the same last flag so it was just a refresh.

Of disconnect if timer is over... Is not a good solution but I think it is easy to do... If someone have a better one...

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions