Do some gods know how SegmentFault's gizp compression works?

Source: Internet
Author: User
Do you know how the gizp compression of SegmentFault is achieved?

Reply content:

Do some gods know how SegmentFault's gizp compression works?

PHP can be directly configured as automatic gzip.

  1. Modifying PHP. iniZlib. output_compressionIsOn.
  2. ActivateZlib. output_compression_levelAnd make it equal to one of 1-5. This value is the compression level. The larger the value, the more severe the compression, and the more CPU consumption.
  3. CheckZlib. output_handlerWhether it has been commented out. If not, comment out it.

If nginx is used, refer to this article.

Add the following configurations to the Server:

Gzip on; gzip_http_version 1.0; gzip_disable "MSIE [1-6]."; gzip_types text/plain application/x-javascript text/css text/javascript;

Server handler

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.