Hi,
I have this following code:
$('#content-load-target').load(location,function(response, status, xhr) {
if (xhr.status != 200) {
location.href = '/';
} else {
//do something else
}
});
The response can be either an ajax page or be redirected (if the session has timed out). In case of redirect I want to reload the whole page. The problem is - the response code is always 200. Even if it redirects, it just loads the redirect page and returns 200. How do I properly catch redirects with this?
Thanks