This code waits for the page to load and then removes all tags after the </html> try it with firebug and you will see. You need to create a place holder as such in this example <div id="last"></div> after your last tag and then it removes the rest of the tags.
<html>
<head>
<script type="text/javascript">
window.onload=function()
{
var body=document.getElementsByTagName('body')[0];
var found=false;
var cur=0;
for(var i=0; i<body.childNodes.length; i++)
{
if(body.childNodes[i].id=='last')
{
cur=i;
found=true;
}
else if(found && i>cur+1)
{
body.removeChild(body.childNodes[i]);
}
}
}
</script>
</head>
<body>
Some text
<div id="last">
</div>
</body>
</html>
<p>
Im not gonna show
</p>
<input/>
<script>
</script>
<b>
</b>
Don't forget to scroll! Enjoy!
Oddly enought the formating of code here is not functioning right. Its probably my fault.
Edit renamed my variable to body