My design of a page forces me to refresh the whole page with html that I have loaded via ajax.
$(\'html\').replaceWith(data);
Gives me errors. A
I had some issues with
$("body").replaceWith(newPage)
giving me some weird css problems, but this worked fine:
$("body").html(newPage);