I need identify, when user going to new page, and if it slowly, identify if the user click in the "stops" browser.
// remove the timer when the pages finally exits.
window.addEventListener("unload", function (event) {
closesWaitingNewPage();
})
window.addEventListener("beforeunload", function (event) {
if (typeof checkChangesBeforeLoad != 'undefined') {
return checkChangesBeforeLoad(event);
}
});
So, i show a loader for my user, waiting load new page. But, if he cancel on browser, my loader still showing.
How can i solve?