Forum Moderators: open

Message Too Old, No Replies

Limitation of file size in IE

IE has limitation on the size of the html file that can be viewed

         

pankajatncst

11:18 am on Jun 23, 2004 (gmt 0)

10+ Year Member



Hi

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

BlobFisk

1:35 pm on Jun 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, pankajatncst!

4MB is extremely large for a web page - most browser would struggle trying to parse that much data.

Is there anyway that you can split all of this up over a number of pages?

pankajatncst

2:17 pm on Jun 23, 2004 (gmt 0)

10+ Year Member



Well I found out the problem with the html code that I was generating, but still have not found a solution to it. Let me explain :
The html document contains only DIV tags which use absolute positioning to position each element. Everything goes fine until it reaches a DIV tag which specifies the top in absolute positioning to be defined as : top:134349pt, All DIV tags after this overwrite this tag in the actual output.
This leads to the assumption that there is some limit on the value that can be given for the top which is somewhere around 134349pt. Is this true? If yes, then why is it working with Mozilla?

Thanks
Pankaj

BlobFisk

2:37 pm on Jun 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's a lot of scrolling to get to the data that is 140,000 pixels from the top... (Don't forget that pts are a print unit and pxs are a screen unit)....

tedster

5:30 pm on Jun 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



absolute positioning to position each element.

You may get much better results if you let the layout flow naturally - but still, that is one HUGE file and finding a way to paginate the results page would be closer to ideal.

DrDoc

9:52 pm on Jun 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As far as file size... I just created a 15Mb file, and it opened just fine. True, it takes a while (depending on your machine and how complex the markup is), but it eventually opened.

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