I’m experiencing some weird symptoms that I haven’t seen before, or didn’t think existed last time I worked with something similar.
I’m trying to fetch a page through $.ajax in jQuery. This works just fine, but if the page is doing a redirect through a header, it causes the AJAX request itself to be redirected, and not the entire page. I was under the impression that this would be what happened instead.
I am well-aware that I can’t detect a redirect through jQuery and AJAX as it happens. However, is there a chance that I can detect it afterwards?
Seems like an odd use-case for ajax. Is window.location() a viable alternative?