Google believes that Internet users ' time is valuable and that their time should not be spent on lengthy page loads, so Google launched the lossless compression algorithm Brotli in September 2015. Brotli data compression through variant LZ77 algorithm, Huffman coding and Ji Jiewen model, it has higher compression efficiency compared with other compression algorithms.
According to a study published by Google, the Brotli compression algorithm has several features, most typically the following 3:
- For common Web resource content, Brotli performance compared to Gzip improved 17-25%;
- When the Brotli compression level is 1 o'clock, the compression rate is higher than the Gzip compression level of 9 (highest);
- Brotli still provides very high compression rates when working with different HTML documents.
With its excellent compression performance, Brotli quickly captured the market, and as you can see, almost all major browsers have supported the Brotli algorithm in addition to IE and Opera Mini.
Brotli Algorithm Support situation
Before the cloud has supported the Gzip algorithm, in the optimization of the speed of the site, and the cloud has always spared no effort to optimize. Currently Pat Cloud CDN has supported the Brotli compression algorithm, the compression rate is increased by 20% by supporting the new compression algorithm, and it helps to reduce the battery usage of mobile devices and to save power and prolong battery life.
How to use the Brotli compression algorithm
Like the Gzip compression algorithm, the Brotli compression algorithm is also free to open to all users on the cloud CDN platform, and this feature is turned on by default.
Using another Pat Cloud CDN Brotli compression algorithm needs to meet three conditions simultaneously:
- Content-type satisfies the following MIME list:
text/plaintext /javascripttext / Span style= "COLOR: #000000" >csstext /xmltext /x- componentapplication /javascriptapplication /x-javascriptapplication / Xmlapplication /jsonapplication /xhtml+ Xmlapplication /rss+xmlapplication /atom+ xmlapplication /x-font-ttfapplication / Vnd.ms-fontobjectimage /svg+xmlimage /x- iconfont /opentypetext /html--default
- Content-length greater than 256 bytes
- Client request headers need to carry ACCEPT-ENCODING:BR
In addition, since not all browsers support the Brotli algorithm, in the CDN edge node, Pat Cloud will also provide files and raw resource files compressed by the Brotli algorithm.
When the client does not support the BROTLI algorithm, the Pat Cloud chooses 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 first respond to the BR version file.
With the Cloud CDN service, you can enjoy the ultimate compression experience for free with the Brotli algorithm, welcome to use.
Recommended reading:
Talk about this year's very hot blockchain CDN
Full-site HTTPS access optimization, and Pat Cloud did what
Reference documents:
Google published research report:http://www. Gstatic.com/b/brotlidocs/brotli-2015-09-22.pdf
Brotli Algorithm Support scenario:/http/caniuse.com/#feat=brotli
Enable the Brotli compression algorithm to reduce the amount of Gzip compressed CDN traffic by 20%