Gzip can compress the webpage size to accelerate the speed of opening the webpage. Currently, almost all mainstream browsers support this function, but enabling Gzip requires support from the server, here we simply use php to determine whether the server supports Gzip.
Create a new php file named test. php. Write the following code into the file:
Copy codeThe Code is as follows:
<? Php phpinfo ();?>
Save and upload the file to the root directory of the space you want to test. After the file is uploaded, open the URL of the file in the browser:
Http: // your domain name and directory/test. php, such as this site is: http://3aj.cn/test.php
After the page is opened, CTRL + F looks for the following strings:
_ SERVER ["HTTP_ACCEPT_ENCODING"]
Check whether the gzip parameter is available later. If so, congratulations, your space supports Gzip. If not, sorry. This means that your website cannot be compressed using Gzip.