Output fn="insert-filter" type="text/*" filter="http-compression" vary="on" compression-level="9" |
In this example, type="text/*" restricts compression to documents that have a MIME type of text/* (for example, text/ascii, text/css, text/html, and so on).
Alternatively, you can specifically exclude browsers that do handle compressed content well by using the Client tag as follows:
<Client match="none"\ browser="*MSIE [1-3]*"\ browser="*MSIE [1-5]*Mac*"\ browser="Mozilla/[1-4]*Nav*"> Output fn="insert-filter" filter="http-compression" type="text/*" </Client> |
This example restricts compression to browsers that are not any of the following:
Internet Explorer for Windows earlier than version 4
Internet Explorer for Macintosh earlier than version 6
Netscape Navigator/Communicator earlier than version 6
Internet Explorer on Windows earlier than version 4 may request compressed data at times, but does not correctly support it. Internet Explorer on Macintosh earlier than version 6 does the same. Netscape Communicator version 4.x requests compression, but only correctly handles compressed HTML. It does not correctly handle linked CSS or JavaScript™ from the compressed HTML, so administrators often simply prevent their servers from sending any compressed content to that browser (or earlier).