title: ModelAndView does not redirect, but give correct response
body: <p>I have the following function that makes a request:  </p>
  
  <pre><code>function postIngredient(action, options) {
      var xhr = new XMLHttpRequest();
      xhr.open(options.method, action, true);
      xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
      xhr.setRequestHeader(options.security.header, options.security.token);
  
      // send the collected data as JSON
      xhr.send(JSON.stringify(options.params));
  
      xhr.onloadend = function () {
          // done
      };
  }
  </code></pre>
  
  <p>The function triggers a method on the server that basically returns a ModelAndView object:  </p>
  
  <pre><code>...   
  ModelAndView mav = new ModelAndView("redirect:/recipies/edit?id=1");  
  ....  
  return mav;  
  </code></pre>
  
  <p>After the post request is successfully done the following GET request is done: 
  <a href="https://i.stack.imgur.com/v6BIw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v6BIw.png" alt="enter image description here"></a></p>
  
  <p>So in the 'Preview' tab of the request I have the correct page where it should redirect, but there is no redirection in the browser. The page remains the same where the postIngredient() function was initialy called. How then could the redirect be made?</p>