302 Redirection with AJAX post request:
问题 I'm implementing logout functionality for a web application. I have a function, which is called when the user clicks the sign out button. $.post(window.location.pathname + '/logout'); The logout service works only with post. What happens is: The 302 status is returned as expected with Location: http://myapp.com/logout.html Apparently the jquery ajax call just picks up from there and immediately makes a GET request to said location. The GET request returns the correct html, but it returns it