title: prevent hashchange on back button
body: <p>I have an application which uses backbone hash routing. When the page reloads I use the <code>onbeforeunload</code> event to tell the user that there are unsaved changes and prevent the page load. This does not work on hash change; so if the user presses back the dialog does not tell them there are changes pending and just goes back.</p>
  
  <p>Is there anyway to detect the hash change and prevent it happening? something like <code>onbeforehashchange</code></p>