Como obter o código de status de resposta do jQuery.ajax?

No código a seguir, tudo o que estou tentando fazer é obter o código de resposta HTTP de uma chamada jQuery.ajax. Em seguida, se o código for 301 (Movido permanentemente), exiba o cabeçalho de resposta 'Local':

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>jQuery 301 Trial</title>
  <script src="http://code.jquery.com/jquery-1.5.1.min.js"></script>

  <script type="text/javascript">
  function get_resp_status(url) {
    $.ajax({
      url: url,
      complete: function (jqxhr, txt_status) {
        console.log ("Complete: [ " + txt_status + " ] " + jqxhr);
        // if (response code is 301) {
        console.log ("Location: " + jqxhr.getResponseHeader("Location"));
        // }
      }
    });
  }
  </script>
  <script type="text/javascript">
  $(document).ready(function(){
    $('a').mouseenter(
      function () {
        get_resp_status(this.href);
      },
      function () {
      }
    );
  });
  </script>
</head>
<body>
  <a href="http://ow.ly/4etPl">Test 301 redirect</a>
  <a href="http://cnn.com/not_found">Test 404 not found</a>
</body>
</html>

Alguém pode apontar para onde estou errado? Quando verifico o objeto 'jqxhr' no Firebug, não consigo encontrar o código de status nem o cabeçalho de resposta 'Local'. Defino o ponto de interrupção na última linha de 'complete'.

Muito obrigado.

questionAnswers(6)

yourAnswerToTheQuestion