From 1a896a9bc176e1af35ee47ebe37cb59d613d2a4f Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Sat, 20 Jan 2018 18:49:05 +0100 Subject: Fix inconsistent line separators across files The development of this project began several years ago on a Windows system until I switched to GNU\Linux. Therefore, some files contained CRLF as line separators, now replaced with LF. --- async.php | 252 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 126 insertions(+), 126 deletions(-) (limited to 'async.php') diff --git a/async.php b/async.php index e82c1cc..bb538e0 100644 --- a/async.php +++ b/async.php @@ -1,127 +1,127 @@ ->> [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 -#=============================================================================== -spl_autoload_register(function($classname) { - $classpath = 'include/classes/%s.php'; - $classname = str_replace('\\', '/', $classname); - - require_once sprintf($classpath, $classname); -}); - -require_once 'include/functions.php'; - -#=============================================================================== -# Check if BigPipe should be disabled -#=============================================================================== -if(isset($_GET['bigpipe'])) { - - # You can use this method also to disable pipeline for Googlebot or something. - BigPipe\BigPipe::enabled($_GET['bigpipe']); -} - -// Outsourced to avoid duplicate code in index.php and async.php -require_once 'include/pagelets.php'; -?> - - - - - - - - - BigPipe Demo - - - - - - - -

BigPipe Async Demo

- -

LOAD CONTENT VIA TRANSPORT FRAME [Current 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.

- -
- - - -
- - -["Application","BigPipe"].forEach(function(name){window[name] = parent[name];});'."\n"; - echo ''."\n\n"; -} - -BigPipe\BigPipe::render(); -?> - +>> [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 +#=============================================================================== +spl_autoload_register(function($classname) { + $classpath = 'include/classes/%s.php'; + $classname = str_replace('\\', '/', $classname); + + require_once sprintf($classpath, $classname); +}); + +require_once 'include/functions.php'; + +#=============================================================================== +# Check if BigPipe should be disabled +#=============================================================================== +if(isset($_GET['bigpipe'])) { + + # You can use this method also to disable pipeline for Googlebot or something. + BigPipe\BigPipe::enabled($_GET['bigpipe']); +} + +// Outsourced to avoid duplicate code in index.php and async.php +require_once 'include/pagelets.php'; +?> + + + + + + + + + BigPipe Demo + + + + + + + +

BigPipe Async Demo

+ +

LOAD CONTENT VIA TRANSPORT FRAME [Current 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.

+ +
+ + + +
+ + +["Application","BigPipe"].forEach(function(name){window[name] = parent[name];});'."\n"; + echo ''."\n\n"; +} + +BigPipe\BigPipe::render(); +?> + \ No newline at end of file -- cgit v1.2.3