Gzip was first created by Jean-loup Gailly and Mark ahttp://www.aliyun.com/zixun/aggregation/16504.html >dler to file compression for UNIX systems. We often use the file suffix. gz in Linux, which is in gzip format. Today has become a very popular data compression format, or a file format, used on the Internet. The gzip encoding on the HTTP protocol is a technique used to improve the performance of Web applications. Large-volume Web sites often use gzip compression technology to allow users to experience faster speeds.
Gzip compression transfer is the content of the Web page in the server compression compressed to the client, and the client browser will automatically extract it after the display in your browser. Therefore, it can more effectively save bandwidth flow, in addition to the old version of the browser may not be displayed, but now most browsers can be normal display, so recommend use. You use gzip compression network, we can test.
Enabling the gzip transfer requires first PHP4.0.5 later versions.
Method 1:
Join in. htaccess
Php_flag zlib.output_compression on
Php_value Zlib.output_compression_level 2
Method 2:
At the beginning of PHP <?php join
Ob_start ("Ob_gzhandler");
Both of these methods can achieve the effect of compressing transmission.
So how to gzip compressed HTML?
This is simple: first make HTML into PHP, and then rewrite HTML in. htaccess.
This article source: your network http://www.niabc.com/bbs/viewthread.php?tid=23