Judging from 127.0.0.1, you made such a strange server, one wonders why you made the server without thinking? Now you see that with this server it is not possible to work via AJAX, why do you not think that maybe the server need to fix?
In principle, JSON is not mandatory and it is possible with HTML, but it will not "transition", "transition" is only with page reload, and you need to edit the DOM, like this:
document.getElementById('container').innerHTML = htmlResp;
htmlResp - string with the server response (responseText), of course it should contain the entire HTML page, but only what should be in a container.