How to increase loading time?

Sprouts

Regular Member
Joined
Mar 20, 2010
Messages
464
Reaction score
328
Ok this may sound like a weird question but I want my site to never fully load...

i.e. the page loads and the user can see the page content but the page never loads and therefore appears to be loading all the time.

is there some way to do this by adding some sort of script that either takes a long time to load or keeps attempting to load (e.g. a loop function).

Thanks
 
Have you considered putting a small iframe in the page, asking it to load another page, then in that other page simply put a refresh with a really long time in it?

Code:
HTML META command can be used to instruct the browser to wait specified seconds and then load the web page. This is the code, which can be used to accomplish this requirement:
<META HTTP-EQUIV="REFRESH" CONTENT="X;URL=MyWebPage.html"> Change the X to the number of seconds you want to wait before MyWebPage.html is loaded. MyWebPage.html is the HTML page intended to be loaded. This page address can be expressed as either a relative or an absolute URL. Remember that all META commands must be placed in the HEAD section of the HTML code, or somewhere between the <HEAD> and </HEAD> tags.
 
Could you throw an infinite loop in right before the closing body tag? I tried a quick test and the result depends on the browser. Some give a slow script warning. Depends on exactly what you need I suppose.

Code:
<script>
while(true) {
        var a = '';
}
</script>
 
You could play with outputing data and then doing something like this:

Code:
<?php

// sleep for 10 seconds

sleep(10);

?>
 
Strangest question ever. Why would you want to do this? I can theorize some very blackhat uses for it. Hopefully you are not going to use this with Adsense.
 
If you got a community e.g. , you can reduce apache requests by using this:

PHP:
<link rel="stylesheet" href="./css/stylecss.php" title="stylesheet" type="text/css" />

Make textfile and put this into:

PHP:
<?php
$offset = 60 * 60 * 24 * 30; // Cache for a month
header("Content-type: text/css");
header ("Cache-Control: max-age=" . $offset . ", must-revalidate");
header ("Expires: " . gmdate ("D, d M Y H:i:s", time() + $offset) . " GMT");

  ob_start("compress");
  function compress($buffer) {
    /* remove comments */
    $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
    /* remove tabs, spaces, newlines, etc. */
    $buffer = str_replace(array("\r\n", "\r", "\n", "\t", '  ', '    ', '    '), '', $buffer);
    /* remove last semicolon */
    $buffer = str_replace(array(";}", "; }"), '}', $buffer);
    return $buffer;
  }

  /* your css files */
  include('styles_global.css');
  include('styles.css');
  include('styles_new.css');
  include('styles_comments.css');
  include('styles_blog.css');
  include('styles_stats.css');
  include('styles_ads.css');

    ob_end_flush();
?>

Save as stylecss.php.
It reduce a bit your loading time.
 
i guess he's thinking it might get people to stay on the page longer. it makes sense to me if thats what he's after.
 
create style.php:
PHP:
<?php
 sleep(25);
 echo chr(64) . "import url(style.php?". time() .");";
?>
on your page include the style.php file via stylesheet:
HTML:
<link rel="stylesheet" href="style.php" type="text/css">
Note: I used chr(64) because BHW wouldnt let me post the AT symbol :(
 
Back
Top