Code For Save bandwidth In PHP

by Naveenkumar 2012-08-24 19:05:22



Save bandwidth

Add the following code at the beginning of your PHP page, and PHP will automatically compress the page to web browsers that support with feature (both Internet Explorer and Mozilla/Firefox do).
Since HTML can easily be compressed, you can expect to cut down by at least 2/3 the bandwidth used at the expense of some extra load on the server's CPU, but the CPU load difference usually isn't even noticeable.


@ini_set('zlib.output_compression_level', 1);
@ob_start('ob_gzhandler');
?>
1721
like
0
dislike
0
mail
flag

You must LOGIN to add comments