Check which action detects browser window close:

  1. Click this Refresh link or the browser's Refresh button
  2. Navigate away from this page through a link
  3. Type another URL in the address bar
  4. Click Back or Forward button
  5. Click the Close (X) button in the top-rightmost corner of the browser
  6. Click the IE icon in the top-leftmost corner and choose Close. Or simply double-click the icon
  7. Press Alt+F4 key

In IE, the last 3 actions are correctly detected by the javascript code inside this page as browser close.