I have a mobile application that I'm trying to force a redirect to the login page on a 401 ajax call; however what seems to be happening is that jQM is trying to load this via AJAX as the request is sent.
This does work for safari and firefox devices but does not work with Chrome, yet to test on an IE device.
$(function() {
$.ajaxSetup({
statusCode: {
401: function() {
console.debug("User is not authenticated");
window.location.href = core.getUrl('/login');
}
}
});
});
UPDATE: Meant that it does not work on chrome, firefox is actually okay.