We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Flush the Buffer | Forum

Topic location: Forum home » Support » General Questions
tammy harris
tammy harris Nov 24 '15
i have been try do this but i can not find where and what file to try it in

When a visitor to your site visits a page, it can takes around 200 – 500 milliseconds for the backend server to put together the HTML version of the page. During this time the browser remains idle. The flush() function in php will help by  loading the partially ready HTML page to the browser and it can start fetching the components, while the backend server is busy with the rest of the contents.

To insert the flush() function in your  site, open up the header.php file and find the </head> tag and insert the <?php flush(); ?> function right after it.


</head> <?php flush(); ?> <body>
ross Team
ross Nov 24 '15
are you sure it is </head> tag ? not </header> ? 
tammy harris
tammy harris Nov 24 '15
it says to insert it  between the head and body 
every page has

<head>
header stuffs
</head>
<?php flush(); ?>
<body>
html
</body>

i been try find where i can do this to test this and to be able put the other code above
<head>
to test the auto og tags thing 

but stuffed if i can find anything lol
ross Team
ross Nov 24 '15
sorry)) if you're looking for html document you need to do that in the html_document.html of your master pages. 
tammy harris
tammy harris Nov 24 '15
no theme general html has the opening <body>
tag it is generated somewhere else

anything in general html is in between 

<body>
general html
</body>

which is crazy as the general html in themes should have both tag

but none do

The Forum post is edited by tammy harris Nov 24 '15
ross Team
ross Nov 24 '15
see reply above it is not general.html
tammy harris
tammy harris Nov 24 '15
awwwwwww  lol i miss read it awesome thanks ross 
i never once even open and look this file
Jordi
Jordi Nov 24 '15
Tammy,


how is the result?

tammy harris
tammy harris Nov 24 '15
i dont know lol is to hard to tell maybe i need clear my browser cache or something
Tecca
Tecca Nov 25 '15
I wouldn't use this. With flush, you can't use gzip. Along with other drawbacks. Plus, most of the site is going to be cached on the second page load.