How does Javascipt handle url redirect response from the server?
URL redirect:
Enter url in browser
Browser sends request to web server
Web server responds back to the browser with the new url
Browser sends a new request to the new url
Webserver directs the request to handler and sends back response to the browser
URL rewrite:
Enter url in browser
Browser sends request to web server
Web server re-writes the url and passes it to the handler and sends back response to the browser
The browser is designed to handle both of the above.
However, when I make a url request via javascript (or jquery) located on the html page, then how does the api call handle redirect response from the server?