equal
deleted
inserted
replaced
125 |
125 |
126 header('Content-Type: application/x-javascript; charset=UTF-8'); |
126 header('Content-Type: application/x-javascript; charset=UTF-8'); |
127 header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT'); |
127 header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT'); |
128 header("Cache-Control: public, max-age=$expires_offset"); |
128 header("Cache-Control: public, max-age=$expires_offset"); |
129 |
129 |
130 if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') ) { |
130 if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) { |
131 header('Vary: Accept-Encoding'); // Handle proxies |
131 header('Vary: Accept-Encoding'); // Handle proxies |
132 if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { |
132 if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) { |
133 header('Content-Encoding: deflate'); |
133 header('Content-Encoding: deflate'); |
134 $out = gzdeflate( $out, 3 ); |
134 $out = gzdeflate( $out, 3 ); |
135 } elseif ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && function_exists('gzencode') ) { |
135 } elseif ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && function_exists('gzencode') ) { |