title: Execute function before refresh
body: <p>On my HTML page, when the user clicks / presses <kbd>F5</kbd> button the page refreshes, but before it refreshes I want to execute a function or a simple alert. </p>
  
  <p>User can click on refresh button, press <kbd>F5</kbd> or <kbd>Ctrl</kbd> + <kbd>R</kbd>.</p>
  
  <p>Using core JavaScript, jQuery or YUI.</p>