Returning redirect as response to XHR request

Viewed 106140

What happens if the browser receives a redirect response to an ajax request?

3 Answers

The ajax-request will follow that redirect afaik. The actual content (.responseText, .responseXML) will be the content from the page you are redirected to.

You might be able to intercept the redirect (status-code, location-header) on readyState 2 or 3, but not sure about it.

Related