In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article is to share with you about how to enable Brotli compression algorithm, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
Google believes that the time of Internet users is precious and that their time should not be spent on long web page loading, so in September 2015, Google launched the lossless compression algorithm Brotli. Brotli uses variant LZ77 algorithm, Huffman coding and second-order text modeling to compress data. Compared with other compression algorithms, it has higher compression efficiency.
According to the research report released by Google, Brotli compression algorithm has many characteristics, the most typical of which are the following three:
For common Web resource content, the performance of Brotli is 17-25% better than Gzip.
When the Brotli compression level is 1, the compression ratio is higher than when the Gzip compression level is 9 (highest).
Brotli still provides a very high compression ratio when dealing with different HTML documents.
Brotli has quickly dominated the market with its excellent compression performance. As you can see from the figure below, with the exception of IE and Opera Mini, almost all major browsers have supported the Brotli algorithm.
△ Brotli algorithm support
Cloud CDN has supported Brotli compression algorithm.
Before Paiyun has supported the Gzip algorithm, in optimizing the speed of the website, Paiyun has always spared no effort to optimize. At present, the cloud CDN already supports the Brotli compression algorithm, which increases the compression ratio by 20% through the support of the new compression algorithm, and helps reduce the battery usage of mobile devices, and achieve the goal of saving power and prolonging battery life.
How to use Brotli Compression algorithm
Like the Gzip compression algorithm, the Brotli compression algorithm is free to all users on the cloud CDN platform, and this feature is enabled by default.
To use the cloud CDN Brotli compression algorithm, three conditions need to be met at the same time:
Content-Type meets the following MIME list:
Text/plain text/javascript text/css text/xml text/x-component application/javascript application/x-javascript application/xml application/json application/xhtml+xml application/rss+xml application/atom+xml application/x-font-ttf application/vnd.ms-fontobject image/svg+xml image/x-icon font/opentype text/html-default
Content-Length is greater than 256byte
The client request header should carry Accept-Encoding: br
In addition, not all browsers support the Brotli algorithm, so at the edge node of the CDN, the cloud will provide both the files compressed by the Brotli algorithm and the original resource files.
When the client does not support the Brotli algorithm, Paiyun will choose to provide the Gzip algorithm to compress the original file and provide it to the client. When the client supports both algorithms, the cloud CDN will give priority to responding to the br version file.
The above is how to enable the Brotli compression algorithm, the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 259
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.