>> [Additional code for the async function] #=============================================================================== # FUNCTION: Return TRUE if the request awaiting a async response #=============================================================================== function isAsyncRequest() { return isset($_GET['response']) AND $_GET['response'] === 'async'; } # <<< #=============================================================================== # Deactivate caching #=============================================================================== header('Cache-Control: no-cache, no-store, must-revalidate'); #=============================================================================== # Include classes and functions #=============================================================================== require_once 'include/classes/BigPipe/BigPipe.php'; require_once 'include/classes/BigPipe/Pagelet.php'; require_once 'include/classes/BigPipe/DemoPagelet.php'; require_once 'include/functions.php'; #=============================================================================== # Check if BigPipe should be disabled #=============================================================================== if(isset($_GET['bigpipe']) AND (int) $_GET['bigpipe'] === 0) { // You can also check for search spiders and disable the pipeline BigPipe\BigPipe::enablePipeline(FALSE); } // Outsourced to avoid duplicate code in index.php and async.php require_once 'include/pagelets.php'; ?>
LOAD CONTENT VIA TRANSPORT FRAME [Current Time: =time();?> – So you can see, that the page does not get completely reloaded]
Look at the developer console of your browser to see the debug messages and how the async response from server looks.