title: What user actions trigger beforeunload in which browsers?
body: <ul>
  <li>closing window</li>
  <li>refreshing page</li>
  <li>clicking on a link</li>
  <li>??</li>
  </ul>
  
  <p>It seems to be inconsistent. (I'm shocked!) Is there a list somewhere? I'm particularly interested in Firefox, but am curious about others, as well. The <a href="https://developer.mozilla.org/en/DOM/window.onbeforeunload" rel="nofollow">Mozilla docs</a> are vague:</p>
  
  <blockquote>
    <p><strong>window.onbeforeunload</strong><br>
    An event that fires before the unload event when the page is unloaded.</p>
    
    <p><strong>window.onunload</strong><br>
    The unload event is raised when the document is unloaded.</p>
  </blockquote>
  
  <p>Gee, thanks.</p>