Christopher Altman
Christopher Altman

Reputation: 4896

Is there a limit to the scroll length of a web page?

I have a client who is building a business application that will be used with IE8 only.

One of the requirements is to display all of the data in a single page. I am anticipating this data table to be somewhere between 3K - 10K pixels in length. In the worst case scenarios, more than 25K pixels.

What are the technical considerations when serving a page that long? Is there a limit on page length and IE would display a error?

The application is Java/Struts based.

Upvotes: 4

Views: 1784

Answers (4)

user169771
user169771

Reputation: 2090

IE10 stops at just under 1534000px in my testing. The limit includes the height of the viewport into the scrollable area so the actual scrollTop is the limit minus the height of the element.

If you set CSS style -ms-scroll-limit-y-max it will clamp at the maximum allowed value, it seems. But in my case I stumbled on this number by accident.

Upvotes: 0

Chris Lercher
Chris Lercher

Reputation: 37778

The theoretical answer: Your machine resources are finite - so yes, there's a limit.

The practical answer: Take a look at other very long pages, e.g. http://svnbook.red-bean.com/en/1.5/svn-book.html

Upvotes: 2

user216441
user216441

Reputation:

Try using this Javascript:

<html>
<head>
<script>
window.onload=function(){
    var i=10000;
    var buff='';
    while(--i){
        buff+='<br />';
    }
    document.body.innerHTML=buff;
}
</script>
</head>
</html>

Upvotes: 4

Bozho
Bozho

Reputation: 597324

Try it with:

<%
for (int i = 0; i < 25000; i ++) {
  %>test<br /><%
}
%>

Upvotes: 1

Related Questions