Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
BrowserMatch ^Mozilla/4 gzip-only-text/htmlMozilla 4? Вы серьёзно? В IE багов нет, начиная с IE6SP2.
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
At first we probe for a User-Agent string that indicates a Netscape Navigator version of 4.x. These versions cannot handle compression of types other than text/html. The versions 4.06, 4.07 and 4.08 also have problems with decompressing html files. Thus, we completely turn off the deflate filter for them.
The third BrowserMatch directive fixes the guessed identity of the user agent, because the Microsoft Internet Explorer identifies itself also as «Mozilla/4» but is actually able to handle requested compression. Therefore we match against the additional string «MSIE» (\b means «word boundary») in the User-Agent Header and turn off the restrictions defined before.
… Например, используем максимальное сжатие на библиотеке jQuery.min:
http://ya.ru:Степень сжатия | размер, байт
В чистом виде | 9118
gzip/xz -1 | 3780 / 3584
gzip/xz -6 | 3515 / 3488
gzip/xz -9 | 3514 / 3488
http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML:Степень сжатия | размер, байт
В чистом виде | 58757
gzip/xz -1 | 20809 / 17616
gzip/xz -6 | 17643 / 16636
gzip/xz -9 | 17607 / 16636
xz) степень сжатия — это не степень сжатия, а количество памяти, которая понадобиться для распаковки, но оно влияет на степень сжатия.
Как работает сжатие GZIP