Forum Moderators: open
I have an application which generates output in the form of an html file. Recently I noticed that if my file size is very large (of the order of 4MB), then I am not able to view the complete file in IE. It garbles the lines at the end. I found the problem with both IE5 & IE6. The output comes fine with Mozilla. If it helps, the html file generated contains only DIV tags in it.
Is this a known bug with IE or is it because of something else?
Pankaj
Thanks
Pankaj
For testing purposes, I put this code on an otherwise empty page:
<div style="width:200px; height:200px; background:red; position:absolute; left:0; top:9999999999999px;">
<script type="text/javascript">
alert(document.body.scrollHeight);
</script>
</div>
IE reports the body height as 134217927px. So it seems like there is, in fact, a limit. So, I decided to try something else:
<div><script type="text/javascript">
while(document.body.scrollHeight < 134217927) {
document.write(document.body.scrollHeight + "<br>")
}
for(i=0;i<10;i++) {
document.write(document.body.scrollHeight + "<br>")
}
</script></div>
Apart from the fact that this second script takes FOREVER to run (turns out it creates an 82Mb[!] file [> 7 million lines], so clearly file size is not a problem), it produces some interesting results. The last 11 lines were all below the 134217927px mark. So, this tells us there's a limit as far as the CSS
top value goes, but not page content as such. Don't try the last example in your browser... Even if you have a monster machine, it still takes a long time to render