According to the performance tip from Yahoo:

When users request a page, it can take anywhere from 200 to 500ms for the backend server to stitch together the HTML page. During this time, the browser is idle as it waits for the data to arrive. In PHP you have the function flush(). It allows you to send your partially ready HTML response to the browser so that the browser can start fetching components while your backend is busy with the rest of the HTML page.


   ... <!-- css, js -->
    <?php flush(); ?>
      ... <!-- content -->

Is there a function in Django/Python that;s simialr to PHP's flush()?


Accepted Answer

No. Is the short answer.

The long answer depends what you're using between the webserver and python: You could implement it with WSGI but it wouldn't be a whimsical task.

Maybe start here?

Written by John Mee
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the community.
It is licensed under cc-wiki