Javascript document.open asynchronous?
- by Alex Schneider
So on my site there is a Javascript function that will load a new site from the server via XMLHttpRequest. After that it replaces the current page with the new one:
var post = new XMLHttpRequest();
post.open('POST', data);
post.onload = function() {
var do = document.open("text/html", "replace");
do.write(post.responseText);
…