Capture redirect location of javascript XMLHttpRequest

后端 未结 2 893
忘掉有多难
忘掉有多难 2020-12-05 08:13

I know that you can\'t, when using an XMLHttpRequest, intercept a redirect or prevent it, as the browser will transparently follow it, but is it possible to either

A

2条回答
  •  感情败类
    2020-12-05 08:44

    After 4 years now it's possible to find the last redirect location using responseURL from XHR instance in Chrome 42+ (Opera 29+) and Firefox 39+ but it's not available in IE, Edge or safari yet.

提交回复
热议问题