As we know, HTTP is a stateless protocol, the browser doesn't keep connecting to the server. When user try to close the browser, it's not possible to tell the server that the browser is closed. The sample demonstrates how to detect the browser close event with iframe.