The onbeforeunload window event

January 8, 2010

The onbeforeunload event is a window event that is triggered when the window is about to close the current page. This occurs in a number of situations, including:

  • when you use the forward or back browser buttons
  • when the page is refreshed
  • when the page is closed
  • when you click on a link to a different page

Read the rest of this entry »