A
A
Abdula Magomedov2017-10-14 21:11:18
JavaScript
Abdula Magomedov, 2017-10-14 21:11:18

What is the X-Redirect header responsible for?

A question. In Yii2, if $this->redirect() is called in a controller and the current request is an ajax request, is the X-Redirect header sent? But for some reason I can't read about this title anywhere on the Internet.
And at the same time, jquery.ajax() reloads the page if X-Redirect is sent, and if Location, then it makes an ajax request to the given URL. In short, what is the X-Redirect header responsible for? And why is there nowhere to read about it? And how to intercept it in jquey.ajax() so that it doesn't reload the page?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2017-10-14
@Avarskiy

www.yiiframework.com/doc-2.0/yii-web-response.html...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question