aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--async.php9
-rw-r--r--include/pagelets.php13
-rw-r--r--index.php8
3 files changed, 13 insertions, 17 deletions
diff --git a/async.php b/async.php
index e8e98da..8d46c89 100644
--- a/async.php
+++ b/async.php
@@ -20,15 +20,6 @@ spl_autoload_register(function($classname) {
require_once sprintf($classpath, $classname);
});
-#===============================================================================
-# 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';
?>
diff --git a/include/pagelets.php b/include/pagelets.php
index 412e530..62c3ed9 100644
--- a/include/pagelets.php
+++ b/include/pagelets.php
@@ -5,6 +5,19 @@
$DEBUGGING = TRUE;
#===============================================================================
+# Check if BigPipe should be disabled
+#===============================================================================
+if(isset($_GET['bigpipe']) AND $_GET['bigpipe'] === '0') {
+ # You can use this method to disable the pipeline for Googlebot or something
+ # else. If BigPipe is "disabled", then all pagelets will be rendered without
+ # being pipelined through the javascript library. The content of the pagelet
+ # will be present at the original position within the HTML response (and all
+ # external stylesheets and javascripts will be displayed as simple <link> or
+ # <script> elements within the HTML document).
+ BigPipe\BigPipe::enabled(FALSE);
+}
+
+#===============================================================================
# Namespace paths based on whether the debugging mode is enabled
#===============================================================================
$pagelet = ($DEBUGGING ? 'Debugging' : 'BigPipe').'\Pagelet';
diff --git a/index.php b/index.php
index b2e3a38..a47b752 100644
--- a/index.php
+++ b/index.php
@@ -9,14 +9,6 @@ spl_autoload_register(function($classname) {
require_once sprintf($classpath, $classname);
});
-#===============================================================================
-# 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::enabled(FALSE);
-}
-
// Outsourced to avoid duplicate code in index.php and async.php
require_once 'include/pagelets.php';
?>