Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > d265f71d7fce441fd72dd0a77d0f8893 > files > 241

apache-ssl-1.3.41_1.59-1mdv2010.0.i586.rpm

<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
 <title>Which browsers can handle 'Content-Encoding:'?</title>
 <meta name="author"      content="Michael Schr&ouml;pl" />
 <meta name="description" content="A description of the behaviour of the most popular web browsers regarding compressed page contents" />
 <meta name="keywords"    content="browsers, HTTP, encoding, gzip, compression" />
 <style type="text/css">
body{font-family:sans-serif;margin:0px 30px 0px 30px;}
h1{font-size:22px;margin-top:20px;}
h2{font-size:18px;margin-top:14px;}
small{font-size:80%;}
td{vertical-align:top;}
tt{font-weight:bold;}
code,tt{font-family:"Courier New",monospace;}
h1,h2{margin-bottom:1px;}
p,td{margin-top:3px;margin-bottom:3px;}
p,ul,ol,li{font-size:17px;line-height:22px;}
ul,ol,li{margin-top:0px;margin-bottom:0px;}
img{border-width:0;}

#nav{position:absolute;top:30px;left:0px;font-size:14px;width:170px;font-weight:bold;margin:2px 2px 2px 30px;}
#nav[id]{position:fixed;}
#nav img{margin:5px;}
#nav p, #nav a:hover, #nav a{display:block;padding:3px;margin:2px;width:150px;font-size:15px;line-height:18px;}
#content{position:absolute;left:220px;right:30px;}
#mail{text-align:right;}
#icon{width:190px;float:left;}
#mail,#icon{margin-top:30px;}

@media screen {
body{color:#000;background-color:#f8ebd9;}
h1{color:#666;}
h2{color:#840;}
code{color:#333;}
em{color:#900;}
tt{color:#909;}
h1,h2,code,em,tt{background-color:inherit;}
.new13192a{color:#inherit;background-color:#ffd;}
.new13261a{color:#inherit;background-color:#eff;}
.bugfix{color:#fff;background-color:#f00;font-weight:bold;padding:0px 4px;}
#nav a{color:#530;background-color:transparent;}
#nav a{text-decoration:none;}
#nav p, #nav a:hover{color:#000;background-color:#fff;}
#nav p {border:1px #660 solid;}
#nav a {border:1px #666 dotted;}
}

@media print {
#icon,#nav{display:none;}
#content{position:absolute;left:0px;right:0px;}
}
 </style>
</head>

<body>

<div id="nav">

<img src="mod_gzip_logo.gif" height="47" width="102" alt="mod_gzip logo" />


<a title="mod_gzip - what's that, anyway?" href="index.htm">mod_gzip</a>



<a title="Compression of HTTP content using Content-Encoding" href="encoding.htm">Content-Encoding</a>



<p>Browsers</p>



<a title="How do Firewalls handle 'Content-Encoding:'?" href="firewalls.htm">Firewalls</a>



<a title="An example configuration for mod_gzip" href="config.htm">Configuration</a>



<a title="Complete description of mod_gzip status codes" href="status.htm">Status Codes</a>



<a title="Possible enhancements in future versions of mod_gzip" href="enhancements.htm">Enhancements</a>



<a title="Caching of negotiated HTTP responses" href="cache.htm">Caching</a>



<a title="Version history and change log for mod_gzip" href="versions.htm">Versions</a>



<a title="Other ressources about mod_gzip" href="links.htm">Links</a>


</div>

<div id="content">

<h1>Which browsers can handle <code>Content-Encoding: gzip</code> ?</h1>

<h2><a id="Netscape3"></a>Netscape 3</h2>
<p>This browser uses HTTP/1.0. It doesn't send an <code>Accept-Encoding</code> header, thus doesn't request compressed content from a server.</p>
<p>The browser <strong>does not yet support the processing of compressed page content</strong>. If it receives gzip compressed content, it recognizes that there is an encoding <code>gzip</code> unknown to it <small>(and displays a corresponding message to the user)</small>, but after that it displays the compressed page content within the browser windows. Serving compressed content unconditionally <small>(like in statically precompressed documents)</small> this browser isn't good for.</p>
<p>A web server correctly evaluating the <code>Accept-Encoding</code> header is able to serve usable, uncompressed data to the browser.</p>

<h2><a id="Netscape4"></a>Netscape 4</h2>
<p>This browser uses HTTP/1.0. From version 4.06 on it is sending the header <code>Accept-Encoding: gzip</code>.</p>
<p>Nevertheless the implementation of handling compressed content contains a number of <strong>bad errors</strong>:</p>
<ul>
 <li>In many 4.x versions <strong>Cascading Style Sheets</strong> that are loaded from a separate file by use of the HTML tag<br />
 <code>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;</code><i>file name</i><code>&quot; /&gt;</code><br />
 will <em>not</em> be decompressed and thus not evaluated.</li>
 <li>In many 4.x versions <strong>JavaScript code</strong> that is loaded from a separate file by use of the HTML tag<br />
 <code>&lt;script type=&quot;text/javascript&quot; src=&quot;</code><i>file name</i><code>&quot; /&gt;</code><br />
 will be decompressed and evaluated <em>only</em> if a <strong>cache is activated</strong> in the browser.<br />
 <small>(In case of activated JavaScript in the browser this problem may additionally cause JavaScript error messages if the HTML source code references definitions of the included JavaScript code.)</small></li>
 <li>In many 4.x versions the HTML code of the document will be decompressed before <strong>printing the page content</strong> <em>only</em> if a <strong>cache is activated</strong> in the browser; the same applies to the <strong>display of the page content in print preview mode</strong>.</li>
 <li>In many 4.x versions the <strong>display of HTML source code</strong> of the current documents works correctly <em>only</em> if a <strong>cache is activated</strong> in the browser. Otherwise an empty screen will be displayed instead of the source code.</li>
 <li>In many 4.x versions the correct handling of <strong>gzip compressed images</strong> may fail in the browser, under circumstances that don't seem to be easily reproducable. <small>(Anyway, images should be optimized manually by using chosing the correct file type, using a minimal color depth for GIF and the like - gzipping an already compressed file format won't lead to an additional gain worth mentioning.)</small></li>
 <li>In the versions 4.06 to 4.08 there are even problems with the processing of JavaScript code inside the <code>&lt;head&gt;</code> section of compressed HTML pages.</li>
</ul>
<p>In all these cases Netscape 4 seems to use the received, yet uncompressed version; obviously the invocation of a <small>(surely available)</small> function for content compression simply has been forgotten at the decisive positions.</p>
<p>And some part of the errors described above may only be in effect if the browser's cache has been set to 0 MB and/or switched off - so it seems Netscape 4 is somehow using the browser cache as temporary storage for decompressing ...</p>

<h2><a id="Mozilla"></a>Netscape 6 &amp; 7 and Mozilla 0.9.x &amp; 1.x</h2>
<p>This browser uses HTTP/1.1. From Netscape 6.2 on <small>(= Mozilla 0.9.4)</small>, it is sending the header <code>Accept-Encoding: gzip, deflate, compress;q=0.9</code>.</p>
<p>Mozilla 0.9.9+ und Netscape 7.0PR1 allow the user to define the HTTP version as well as the content of this headers in its configuration; in Mozilla 1.1alpha this function is no longer visible in the preferences but can be defined in the configuration file <code>defaults/pref/all.js</code> <small>(under the name <code>network.http.accept-encoding</code>)</small>.</p>
<p>Processing compressed content works <em>if the browser has requested compressed content</em>; otherwise it ignores the HTTP header <code>Content-Encoding: gzip</code> although it would be able to decompress the content.</p>

<h2><a id="Microsoft"></a>Microsoft Internet Explorer 4.0, 5.0, 5.5 and 6.0</h2>
<p>This browser uses either HTTP/1.0 or HTTP/1.1, depending upon the settings in the internet options. It is sending the header <code>Accept-Encoding: gzip, deflate</code> - but only if using HTTP/1.1.</p>
<p>Processing compressed content works <em>if the browser has requested compressed content</em>; otherwise it ignores the HTTP header <code>Content-Encoding: gzip</code> although it would be able to decompress the content.</p>
<p>Some older versions of the Internet Explorer seem to fire the JavaScript event <code>onLoad</code> already when they have successfully <em>received</em> a JavaScript file referenced within the <code>&lt;head&gt;</code> section instead of waiting for the successful completion of <em>decompressing</em> its content.</p>

<h2><a id="Opera-old"></a>Opera 3 and 4</h2>
<p>Opera 3.5 does <em>not yet</em> understand compressed content.</p>
<p>From version 4 on Opera is using HTTP/1.1. Opera 4.0beta3 did already try to communicate in compressed form but sent the header <code>TE: deflate, gzip, x-gzip, identity, trailers</code>, i.&nbsp;e. it expected gzip compression to be applied as <em>Transfer Encoding</em>, not as <em>Content Encoding</em>.</p>

<h2><a id="Opera"></a>Opera 5 and 6</h2>
<p>Starting with version 5.12 <small>(or a bit earlier)</small> Opera is sending the header <code>Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0</code>. Processing compressed content works without known problems in versions 5 and up.</p>
<p>Opera 6 <small>(as the single known browser up to now)</small> decompresses gzip-compressed document content even if the server did <em>not</em> call its attention to it by serving the HTTP header <code>Content-Encoding: gzip</code>.</p>

<h2><a id="Lynx"></a>Lynx</h2>
<p>Lynx supports gzip-compressed communikation since version 2.6.</p>
<p>The first Lynx versions had to start a separate process using an external <code>gzip -d</code> command for decompressing. This of course leads into problems in case of no <code>gzip</code> command being available.</p>
<p>More recent versions of Lynx <small>(since 1997-08-14, see Lynx 2.8.0 <code>CHANGES</code> file)</small> use the <code>zlib</code> library for decompressing and don't have these problems any more.</p>

<div id="icon">
 <a href="http://validator.w3.org/check/referer"><img alt="" title="valid XHTML 1.1" height="31" width="88" src="valid-xhtml11.png" /></a><a href="http://jigsaw.w3.org/css-validator/check/referer"><img alt="" title="valid CSS" height="31" width="88" src="valid-css.png" /></a>
</div>


<p id="mail">(<a href="mailto:michael.schroepl&#x40;gmx.de?subject=mod_gzip">Michael Schr&ouml;pl</a>, 2002-09-16)</p>

</div>

</body>
</html>