How to identify termination of session by the user


I

Itamar Lev

I have a web application and I send from the server a very large HTML table
that's being shown to the client in a special window.

my question is how do I know if the client closed the special window,
that is if he doesn't like it to be shown. How do I stop the server ?
I looked for a method that can indicate that the client side is done
but I didn't find anything...
 
Ad

Advertisements

K

Kevin Pors

I have a web application and I send from the server a very large HTML table
that's being shown to the client in a special window.

my question is how do I know if the client closed the special window,
that is if he doesn't like it to be shown. How do I stop the server ?
I looked for a method that can indicate that the client side is done
but I didn't find anything...

You could send a message to the server through sockets when the client
closes it? The server could then figure out what to do.

Just an idea
 
K

Kevin Pors

With message I mean something like a String or something identifying the termination of the client.
 
C

Christian Kreutzfeldt

Itamar Lev said:
my question is how do I know if the client closed the special window,
that is if he doesn't like it to be shown. How do I stop the server ?
The user opens the window and a request is sent to the server where the
response
should be directed back to that window, right? You want to know if the
window is still open while doing the work? Mmmh, I don't think that it is
possible. You will recognize it is the response runs into a dead end.

With regards,
Christian Kreutzfeldt
 
Ad

Advertisements

I

Itamar Lev

Christian Kreutzfeldt said:
The user opens the window and a request is sent to the server where the
response
should be directed back to that window, right? You want to know if the
window is still open while doing the work? Mmmh, I don't think that it is
possible. You will recognize it is the response runs into a dead end.

With regards,
Christian Kreutzfeldt

well I found a solution ...
when the client closes the window it sends a message to the server
which changes an attribute in the session to indicate that the process
should be terminated. The command that's responsible for the
connection with the client checks the session attribute every number
of iteration and if the
session was changed - breaks.
 

Top