To make the console log get preserved when clicking outside the page
Test a link out to Google
Page source at: https://glitch.com/edit/#!/test-beforeunload-pagehide