0

I am currently using the python requests module which can easily show the response's redirect history:

>>> r = requests.get('http://github.com')
>>> r.history
[<Response [301]>]

I wish to know, if it is also possible to view this in jQuery by Ajax? In addition, is it possible to disable the redirection?

Xiaojun Chen
  • 1,222
  • 2
  • 12
  • 21
  • which redirection ? To see ajax calls you can in your browser press F12 and open Network tab. There are all files you call/ed with response, method, headers etc.. – Filip Kováč Aug 22 '16 at 11:31
  • @FilipKováč I mean whether the page I requested redirect me to another page. I know in the browser I can check all the requests and response I made, but I would like to program depending on the redirect history. – Xiaojun Chen Aug 22 '16 at 11:38
  • Possible duplicate of [Prevent redirection of Xmlhttprequest](http://stackoverflow.com/questions/228225/prevent-redirection-of-xmlhttprequest) – Dekel Aug 22 '16 at 11:39
  • @Dekel I can't find the answer to my question there. – Xiaojun Chen Aug 22 '16 at 11:41
  • The answer is that you can't (no access, no prevent). Sorry. – Dekel Aug 22 '16 at 11:59

0 Answers0