Handling 302 Redirects in AJAX (or XHR) Calls and Forcing Browser Navigation in javascript

When working with AJAX (XHR) requests, it’s common to encounter scenarios where the server responds with a 302 status code, indicating a…