Compression tweaks.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-12-16 08:04:55 +00:00
parent 4260bf8b16
commit 30c70223b3
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");