Stop before unloading the page Leave a reply With Javascript: http://stackoverflow.com/questions/1704533/intercept-page-exit-event With JQuery: http://stackoverflow.com/questions/6063522/jquery-beforeunload