title: jQuery Ajax issue with statusCode
body: <p>Using jQuery to perform an ajax POST, as the page requires the user to be authenticated, sometimes (when the session expires), server responds with a 302. So I'm trying to catch that response code from the ajax and redirect to the homepage.</p>
  
  <p>My ajax looks like this:</p>
  
  <pre><code>$.ajax(this.action, {
          type: "POST",
          data: {value:input},
          statusCode: {
              301: function(resp){
                  window.location.replace('/');
              },
              302: function(resp){
                  window.location.replace('/');
              }
          },
          success: function(response){
              $('#obtained').val(response);
          },
          error: function(error){
              alert(error);
          }
      });
  </code></pre>
  
  <p>But for some reason the function in the 302 or any other status code never get triggered.</p>
  
  <p>Is this deprecated or am I missing something?</p>
  
  <p>Thanks!</p>