> Blank the page immediately with "document.body.innerHTML=''" before the page replacement
That's what the "document.body.style.opacity = 0;" is for. Though I agree emptying out the body is probably better.