PHP output buffering not flushing
<p>I have an <code>ob_start();</code> in my header.php and <code>ob_end_flush(); include("cron.php");</code> in my footer.</p>

<p>Now the cron.php takes a few seconds to load so it takes time for the page to render.</p>

<p>How come it isn't rendering considering I have flushed the output? I know browsers mess with this and in the past their have been techniques but I have tried them (eg. adding <code>flush();</code> or a UTF-8 header) but none of them have worked.</p>

<p>Is there a solution that works or is there another way for me to accomplish this?</p>

<p>How does WordPress include it's cron file?</p>

<p>header.php:</p>

<pre><code>&lt;?php
    ob_start();
    require_once("config.php");
?&gt;
</code></pre>

<p>Then there's the page code.</p>

<p>footer.php:</p>

<pre><code>&lt;?php ob_flush(); flush(); ob_end_flush(); require("cron.php"); ?&gt;
</code></pre>