After page fully loaded, i make ajax request to an action.
While waiting for response from action (it takes 2 or 3 seconds), if user clicks on other link, i want to abort previous request and kill mysql process at once.
How can i do this?
I tried to do like this
var xhr = $.ajax({
/*
params
*/
});
//before unload page
xhr.abort();
but i think, that it will not kill sql process.