Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the 302 error code that jQuery AJAX is throwing?

Tags:

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?

like image 656
André Miranda Avatar asked Sep 24 '09 18:09

André Miranda


People also ask

What error code is 302?

What is an HTTP 302? The 302 status code is a redirection message that occurs when a resource or page you're attempting to load has been temporarily moved to a different location.

How do I fix error 302?

You can follow these five steps to fix HTTP 302 errors on your website: Determine whether the redirects are appropriate or not by examining the URLs that are issuing the 302 redirects. Check your plugins to make sure any redirect settings are valid. Ensure that your WordPress URL settings are configured correctly.

What is an AJAX error?

Many pages send AJAX requests to a server. Because this relies on the cooperation of the server and the network between the client and the server, you can expect these AJAX errors: Your JavaScript program receives an error response instead of data; Your program has to wait too long for the response.


1 Answers

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.

like image 161
Chetan S Avatar answered Sep 17 '22 08:09

Chetan S