JQuery Ajax automatically redirected without setting cookies?

When I use jQuery ajax call (post or get) and I get a redirect (302), it seems that Jquery is automatically redirecting. In other words, it does not cause completion or successful callbacks until a redirect is complete. In addition, relaying is not taken into account in the cookie settings from the original response. In other words, the cookie set from the initial answer is filled with a lot of things, but when the redirect occurs, the cookie is not present. Therefore, I have 2 questions.

1) Is jQuery an ajax call to automatically follow call forwarding? Is there a way to do this not after the redirect?

and

2) When it redirects, are the cookies that should be set from the original response? Or should they always be empty?

+6
source share
1 answer
  • I thought that AJAX calls were just browser requests that should follow the redirects.
  • Why is there a set cookie with 302? I am not sure if I understand this question.
0
source

Source: https://habr.com/ru/post/895461/


All Articles