Open developer tools and click on different options to see:
- CORS Errors for external domain.
- Response text for same domain.
- HTML has response but not fully parsed when replacing from same domain.
- GET method not allowed with anchor link, just POST.
Another approach would be a URL in a JSON response from the endpoint and redirect from JS.