What is the 302 error code that jQuery AJAX is thr

2020-03-08 08:04发布

I'm working with ASP.NET MVC and jQuery and I have a UserControl that is repeated on every page. In every page request, an AJAX callback occurs. So far so good.

But when I'm in localhost and I publish the site, I notice that this AJAX is throwing a 302 error. This only occurs on https pages, and only in FF and Chrome. On IE, the AJAX request works fine.

What is this 302 error? Why does it only occur on https pages, and only in FF and Chrome?

4条回答
贼婆χ
2楼-- · 2020-03-08 08:29

HTTP 302 is used for redirection. My guess is that there is some sort of server error and you are being redirected to an error page using 302. Check the server logs for errors.

查看更多
爷、活的狠高调
3楼-- · 2020-03-08 08:32
Emotional °昔
4楼-- · 2020-03-08 08:48

HTTP code 302 represents a redirection. The server is trying to tell you to redirect somewhere.

http://en.wikipedia.org/wiki/HTTP_302

查看更多
Fickle 薄情
5楼-- · 2020-03-08 08:49

Does the server you accessing has Page Redirection facility? and that the page you access by Ajax was redirected to another page? If that is the case, you'd disable the redirection(at least ignore redirection for that page) then give it a try. PS: I think Ajax may not support url redirection.

查看更多
登录 后发表回答