I think Global Ajax Event Handlers
meets your needs. For example following code sets a global error handler which will redirect user to login page if her session is timeout.
$(document).ajaxError(function (event, jqxhr, settings, exception) {
if (jqxhr.status == 401 || jqxhr.statusText == "Unauthorized") {
window.location.href = '/login';
}
});