Compression tweaks.

git-svn-id: https://develop.svn.wordpress.org/trunk@3320 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-12-16 08:04:55 +00:00
parent dcd75531cb
commit b7ef286e0b
2 changed files with 1 additions and 5 deletions

View File

@ -767,7 +767,6 @@ function get_all_page_ids() {
}
function gzip_compression() {
if ( strstr($_SERVER['PHP_SELF'], 'wp-admin') ) return false;
if ( !get_settings('gzipcompression') ) return false;
if ( extension_loaded('zlib') ) {

View File

@ -56,10 +56,7 @@
// General options
$expiresOffset = 3600 * 24 * 30; // 30 days util client cache expires
// Only gzip the contents if clients and server support it
$encodings = explode(',', strtolower($_SERVER['HTTP_ACCEPT_ENCODING']));
if (in_array('gzip', $encodings) && function_exists('ob_gzhandler'))
@ ob_start("ob_gzhandler"); // Don't let warnings foul up the JS
gzip_compression();
// Output rest of headers
header("Content-type: text/javascript; charset: UTF-8");