How is it possible to identify that the browser\'s close button was clicked?
There is usually an event which fires when the user leaves the page (unload?) - this may be browser specific.
There is also a property, window.closed, which is set on the window object after its associated window is closed. This is typically used when you have a reference to a popup window.
I'm not sure whether the unload event would be fired before or after the "closed" property is set - you'll have to experiment.
It may be that you can't distinguish between a closed window and a browser which has gone to another site.
Browsers do not have a close event so you can't really tell when the user has closed their browser, there are some potential workarounds in This thread
If you let us know what you are trying to achieve, there may be an alternative way