I\'m looking for a way to remove the entire content of a web page using pure Javascript -- no libraries.
I tried:
document.documentElement.innerHTML
document.documentElement.innerHTML=''; document.open();
The Document.open() method opens a document for writing. if you dont use open method, you cant modify Document after set innerhtml to empty string