I suspect you probably want to be able to receive the response after navigating away from the page that initiated the request. This is not possible... but you can fake it.
The trick is to keep the piece of code that initiated the AJAX call, as you navigate around. Probably the easiest was is to stick the the whole site/app in an iframe.
Always look on the bright side of life. At least this ad is really tiny:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earthhttps://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter