Update of /cvsroot/openfirst/www/inc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25529
Modified Files:
headers.php
Log Message:
Enable gzip when possible.
Index: headers.php
===================================================================
RCS file: /cvsroot/openfirst/www/inc/headers.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** headers.php 5 Nov 2005 14:57:51 -0000 1.31
--- headers.php 15 Nov 2005 15:14:13 -0000 1.32
***************
*** 1,3 ****
--- 1,12 ----
<?php
+ // Check to see if the browser supports gzip
+ if(strpos(" " . $_SERVER["HTTP_ACCEPT_ENCODING"], "gzip")) {
+ // Enable gzip compression (this shrinks the size of pages dramatically-- see http://www.whatsmyip.org/mod_gzip_test/ for a test)
+ if (extension_loaded('zlib') && ini_get("zlib.output_compression") == 0) {
+ ob_start("ob_gzhandler");
+ ob_implicit_flush(1);
+ }
+ }
+
if($_SERVER["PHP_SELF"] != "/installer/index.php") {
***************
*** 87,90 ****
--- 96,100 ----
+
<a href="/doc/tut/howto/">openFIRST Contributor's HOWTO</a>. New contributors are always welcome.</p>
</div>
|