1. What is gzip?A: gzip was first created by Jean-Loup gailly and Mark Adler for File compression in UNIX systems. We often use files suffixed with .gz in linux, which are in GZIP format. Nowadays, it has become a widely used data compression format
The file header is composed of fixed-length part and extension part, the extension part does not exist, especially the HTTP compression used in the network transmission, if the gzip format is used, the corresponding compression message usually does
In general, we have a lot of data transmission mechanisms to reduce the bandwidth pressure on the server. We will adopt a method to compress file transmission. in php, zlib can also achieve gzip compression output, the following is a summary of GZIP
Modern browsers IE6 and Firefox support the client gzip, that is, the Web page on the server, before transmission, the first use of gzip compression and then transmitted to the client, after the client received by the browser to extract the display,
In general, we have a large number of data transmission manager want to reduce the bandwidth of the server pressure, will take a way to compress file transfer, PHP with Zlib can also achieve gzip compression output, below we look at the gzip
Note:
This post is completed one day and one night. Different from the general online articles, except for detailed descriptions of the entire configuration process and test process, especially in FastCGI, Microsoft's "web platform installer" is
GZIP (Gnu-zip) is a compression technique. The page size can be turned into 30% or smaller after gzip compression. This way the user will feel very happy when browsing!
Preparatory work
1, can not find the Php_zlib.dll file?
Since the php4.3
First scenario: Add in. htaccess
The code is as follows
Copy Code
AddHandler application/x-httpd-php. css. html. js#这是添加你要压缩的类型Php_value auto_prepend_file "/home/a4284418/public_html/gzip.php"
This article describes how to compress pages to save website bandwidth and increase user access speeds.
The website access speed is determined by multiple factors, such as the application response speed, network bandwidth, server performance, and
Details about the GZIP compression function of the PHPzlib extension page. To implement GZIP compression pages, the browser and the server need to support them. in fact, the server is compressed. after being uploaded to the browser, the browser
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.