In my application, the client is a Javascript set of functions in the browser, and it does some work - for example, playing a clip. It uses XmlHttpRequest to talk to the server. However, the server is allowed to abruptly close the connection since there is no other way it seems, to interrupt the client. Can the client detect, while it is playing the clip, that the connection was closed, and so print a message and erase the page? Any help appreciated. thanks, AnilIn my application, the client is a Javascript s