How long can a webpage be?

后端 未结 8 2169
青春惊慌失措
青春惊慌失措 2021-02-18 22:24

Bit of a bizarre question, but does anyone know the actual limit to the length of a webpage, and why it is the limit?

As an experiment, I\'m using HTML and CSS to make a

相关标签:
8条回答
  • 2021-02-18 22:52

    Besides a possible maximum int value, you need to consider the load time for the page. If your web page takes longer than a few seconds to show any interesting content, than you will lose people browsing your content. That's a more meaningful metric than a 1:1 scale metric.

    0 讨论(0)
  • 2021-02-18 22:58

    It appears to simply be a maximum value that margin-top property can be set to. I've tried values up to 400,000cm with 100 elements and the page loads them all fine. I even tried incrementing that up to 1000 elements to see if the number was affected by load time, but nothing. It does appear to be an exact number somewhere between 400,000 and 500,000 that it cuts off at and shortens down past that value.

    Code I used (which worked, showed in full):

    <?php
    
    print "<ul>";
    for ($i = 1; $i <= 1000; $i++) print "<li style=\"margin-top: 400000cm;\">{$i}</li>";
    print "</ul>";
    die();
    
    ?>
    
    0 讨论(0)
提交回复
热议问题